def __init__(self, data):
self.data = data
def probe(self, probe):
- s = ord(self.data[probe / 8]) & (1 << (probe % 8))
+ s = self.data[probe / 8] & (1 << (probe % 8))
return True if s else False
def sampleiter(data, unitsize):
super(Decoder, self).put(timeoffset, duration, output_id, data)
def decode(self, timeoffset, duration, data):
- """I2C protocol decoder"""
-
self.timeoffset = timeoffset
self.duration = duration
print("++", timeoffset, duration, len(data))