]> sigrok.org Git - libsigrokdecode.git/commitdiff
Drop obsolete workarounds in PDs.
authorUwe Hermann <redacted>
Wed, 1 Mar 2017 23:03:16 +0000 (00:03 +0100)
committerUwe Hermann <redacted>
Fri, 3 Mar 2017 19:12:53 +0000 (20:12 +0100)
Some PDs were using a temporary workaround for (as it turned out) a
refcounting issue that was fixed in 066fbafdc3ba734a73b5f7fcfa1dbae67ddebf8a.

decoders/i2c/pd.py
decoders/parallel/pd.py

index 6172fb438c50f9295c8786fe47d0d9672e4e4f85..d2f8bc454fed3c00341fb986de57c7defdee2e3d 100644 (file)
@@ -272,8 +272,7 @@ class Decoder(srd.Decoder):
                 #  a) Data sampling of receiver: SCL = rising, and/or
                 #  b) START condition (S): SCL = high, SDA = falling, and/or
                 #  c) STOP condition (P): SCL = high, SDA = rising
-                conds = [{0: 'r'}, {0: 'h', 1: 'f'}, {0: 'h', 1: 'r'}]
-                pins = self.wait(conds[:]) # TODO
+                pins = self.wait([{0: 'r'}, {0: 'h', 1: 'f'}, {0: 'h', 1: 'r'}])
 
                 # Check which of the condition(s) matched and handle them.
                 if self.matched[0]:
index 748cb2b44b0a0555d5c34e9ce0f40e3fe8072afc..db9b371f3687ed5e570a4e2a83b5dcde1adb5adc 100644 (file)
@@ -177,7 +177,7 @@ class Decoder(srd.Decoder):
                 if self.has_channel(i):
                     conds.append({i: 'e'})
             while True:
-                self.handle_bits(self.wait(conds[:])[1:])
+                self.handle_bits(self.wait(conds)[1:])
         else:
             # Sample on the rising or falling CLK edge (depends on config).
             while True: