def __init__(self, data):
self.data = data
def probe(self, probe):
- s = ord(self.data[int(probe / 8)]) & (1 << (probe % 8))
+ s = self.data[int(probe / 8)] & (1 << (probe % 8))
return True if s else False
def sampleiter(data, unitsize):
pass
def decode(self, timeoffset, duration, data):
- """Counts the low->high and high->low transitions in the specified
- channel(s) of the signal."""
-
# We should accept a list of samples and iterate...
for sample in sampleiter(data, self.unitsize):