]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cfilter/pd.py
Use the new Decoder.register() API
[libsigrokdecode.git] / decoders / i2cfilter / pd.py
index 4586cf7de77f5e8da2c529cb7ad4597e8f68b5b5..4fe3a9c94e39679edfc6970ee1c25227ed661a76 100644 (file)
@@ -48,7 +48,7 @@ class Decoder(srd.Decoder):
         self.packets = [] # Local cache of I2C packets
 
     def start(self):
-        self.out_proto = self.add(srd.OUTPUT_PYTHON, 'i2c')
+        self.out_proto = self.register(srd.OUTPUT_PYTHON, proto_id='i2c')
         if self.options['address'] not in range(0, 127 + 1):
             raise Exception('Invalid slave (must be 0..127).')
         if self.options['direction'] not in ('both', 'read', 'write'):