Esempio n. 1
0
def generateSymbols():
    
    newSymbols = []

    for i in range(100): #for all of the possible symbols
        #print int(math.floor(i/10)),i % 10
        
        peaks = symbols[int(math.floor(i/10))]
        valleys = symbols[i % 10]
        
        bars = []
        for j in range(len(peaks)):
            wide = False
            if peaks[j] == 'w':
                wide = True
            bars.append(bar(True,wide=wide))
            wide = False
            if valleys[j] == 'w':
                wide = True
            bars.append(bar(False,wide=wide))

        
        newSymbols.append(symbol(value=i,bars=bars))

    return newSymbols
Esempio n. 2
0
        def setUp(self):

            t = datetime.now()
            ts = []
            for i in range(3):
                ts.append(t+timedelta(0,i))

            self.testSymbol1 = symbol(value=4,bars=[bar(False),bar(True),bar(False),bar(True,wide=True),bar(False),bar(True),bar(False),bar(False)],pulses=ts)
            self.symbols = generateSymbols()
Esempio n. 3
0
def generateSymbols():

    newSymbols = []

    for i in range(100):  #for all of the possible symbols
        #print int(math.floor(i/10)),i % 10

        peaks = symbols[int(math.floor(i / 10))]
        valleys = symbols[i % 10]

        bars = []
        for j in range(len(peaks)):
            wide = False
            if peaks[j] == 'w':
                wide = True
            bars.append(bar(True, wide=wide))
            wide = False
            if valleys[j] == 'w':
                wide = True
            bars.append(bar(False, wide=wide))

        newSymbols.append(symbol(value=i, bars=bars))

    return newSymbols
Esempio n. 4
0
symbol8 = ['w','n','n','w','n']
symbol9 = ['n','w','n','w','n']

#appending the integer symbols
symbols = [symbol0,symbol1,symbol2,symbol3,symbol4,symbol5,symbol6,symbol7,symbol8,symbol9]

#special symbols
frameIdentifier1 = symbol(value=-1,bars=[
        bar(False),
        bar(False),
        bar(True),
        bar(False),
        bar(False),
        bar(False),
        bar(False),
        bar(True),
        bar(False),
        bar(True),
        bar(False),
        bar(True),
        bar(False),
        bar(False),
        bar(False),
        bar(False)])

#frameIdentifier2 = Symbol(value=-2,bars=[Bar(False),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False)])
#frameIdentifier3 = Symbol(value=-3,bars=[Bar(False),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False)])
identifiers = [frameIdentifier1]

def generateIdentifiers():
    return identifiers
Esempio n. 5
0
symbols = [
    symbol0, symbol1, symbol2, symbol3, symbol4, symbol5, symbol6, symbol7,
    symbol8, symbol9
]

#special symbols
frameIdentifier1 = symbol(value=-1,
                          bars=[
                              bar(False),
                              bar(False),
                              bar(True),
                              bar(False),
                              bar(False),
                              bar(False),
                              bar(False),
                              bar(True),
                              bar(False),
                              bar(True),
                              bar(False),
                              bar(True),
                              bar(False),
                              bar(False),
                              bar(False),
                              bar(False)
                          ])

#frameIdentifier2 = Symbol(value=-2,bars=[Bar(False),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False)])
#frameIdentifier3 = Symbol(value=-3,bars=[Bar(False),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(True),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False),Bar(False)])
identifiers = [frameIdentifier1]