]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/nunchuk/nunchuk.py
srd: I2C: change format to have ACK/NACK bits as separate events
[libsigrokdecode.git] / decoders / nunchuk / nunchuk.py
index f9019050439a359727e2b3c7bd754d818f0d4616..0e5e7420843745311e7c86a482e6188b42845cab 100644 (file)
@@ -43,7 +43,7 @@ class Decoder(srd.Decoder):
     optional_probes = [] # TODO
     options = {}
     annotations = [
-        ['TODO', 'TODO'], 
+        ['TODO', 'TODO'],
     ]
 
     def __init__(self, **kwargs):
@@ -60,7 +60,7 @@ class Decoder(srd.Decoder):
 
     def decode(self, ss, es, data):
 
-        cmd, databyte, ack_bit = data
+        cmd, databyte = data
 
         if cmd == 'START': # TODO: Handle 'Sr' here, too?
             self.state = START
@@ -121,7 +121,7 @@ class Decoder(srd.Decoder):
             if self.state == IDLE:
                 self.state = INITIALIZED
             return
-    
+
             if databyte == 0x40 and self.state == START:
                 self.state = INIT
             elif databyte == 0x00 and self.state == INIT: