]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/nunchuk.py
srd: decoders: Rename obsolete timeoffset/duration.
[libsigrokdecode.git] / decoders / nunchuk.py
index 009459db861d09736f516fa9c00ba057263828fa..bda374522e43bce637597b98a67dceaff659c055 100644 (file)
@@ -75,11 +75,9 @@ class Decoder(srd.Decoder):
     outputs = ['nunchuck']
     probes = [] # TODO
     options = {}
+    annotations = []
 
     def __init__(self, **kwargs):
-        self.out_proto = None
-        self.out_ann = None
-
         self.state = IDLE # TODO: Can we assume a certain initial state?
 
         self.sx = self.sy = self.ax = self.ay = self.az = self.bz = self.bc = 0
@@ -87,13 +85,13 @@ class Decoder(srd.Decoder):
         self.databytecount = 0
 
     def start(self, metadata):
-        # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'nunchuk')
-        self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'nunchuk')
+        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'nunchuk')
+        self.out_ann = self.add(srd.OUTPUT_ANN, 'nunchuk')
 
     def report(self):
         pass
 
-    def decode(self, timeoffset, duration, data):
+    def decode(self, ss, es, data):
         out = []
         o = {}