]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cdemux/pd.py
Drop obsolete report() method.
[libsigrokdecode.git] / decoders / i2cdemux / pd.py
index afeaea8082f09b4a48bda2e4ca80f5c2a1512311..3904643f4947c827727ec882a8037f412251f3a9 100644 (file)
@@ -42,12 +42,9 @@ class Decoder(srd.Decoder):
         self.stream = -1 # Current output stream
         self.streamcount = 0 # Number of created output streams
 
         self.stream = -1 # Current output stream
         self.streamcount = 0 # Number of created output streams
 
-    def start(self, metadata):
+    def start(self):
         self.out_proto = []
 
         self.out_proto = []
 
-    def report(self):
-        pass
-
     # Grab I2C packets into a local cache, until an I2C STOP condition
     # packet comes along. At some point before that STOP condition, there
     # will have been an ADDRESS READ or ADDRESS WRITE which contains the
     # Grab I2C packets into a local cache, until an I2C STOP condition
     # packet comes along. At some point before that STOP condition, there
     # will have been an ADDRESS READ or ADDRESS WRITE which contains the
@@ -68,8 +65,8 @@ class Decoder(srd.Decoder):
 
             # We're never seen this slave, add a new stream.
             self.slaves.append(databyte)
 
             # We're never seen this slave, add a new stream.
             self.slaves.append(databyte)
-            self.out_proto.append(self.add(srd.OUTPUT_PROTO,
-                                  'i2c-%s' % hex(databyte)))
+            self.out_proto.append(self.register(srd.OUTPUT_PYTHON,
+                                  proto_id='i2c-%s' % hex(databyte)))
             self.stream = self.streamcount
             self.streamcount += 1
         elif cmd == 'STOP':
             self.stream = self.streamcount
             self.streamcount += 1
         elif cmd == 'STOP':