]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2c.py
srd: Remove decode() docstrings.
[libsigrokdecode.git] / decoders / i2c.py
index 8b8e665e47618535c685c9953ffba07668760ef1..cf16d3a28dc0ab86937a170bedba6a22e404e583 100644 (file)
@@ -148,7 +148,7 @@ class Sample():
     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):
@@ -323,8 +323,6 @@ class Decoder(sigrok.Decoder):
         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))