]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cdemux/pd.py
Use the new Decoder.register() API
[libsigrokdecode.git] / decoders / i2cdemux / pd.py
index 1e1d09c7910489a1346da0a7b408e756b4bcef8b..d86c59781728fa93c52b4c888ab7c070f5455029 100644 (file)
@@ -68,8 +68,8 @@ class Decoder(srd.Decoder):
 
             # We're never seen this slave, add a new stream.
             self.slaves.append(databyte)
-            self.out_proto.append(self.add(srd.OUTPUT_PYTHON,
-                                  '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':