From 1b9ef18be867133e721681cbc20272cf5c669504 Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Sun, 18 Jun 2017 19:27:47 +0200 Subject: decoders: Rephrase condition-less .wait() calls (self documentation) Telling .wait() to "skip one sample" slightly obfuscates the intent of getting the next samples while no condition applies. Explicitly pass no condition arguments instead, to better reflect the purpose. Coincidently these .wait() calls will execute in slightly less expensive code paths in the common code. --- decoders/wiegand/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoders/wiegand') diff --git a/decoders/wiegand/pd.py b/decoders/wiegand/pd.py index 42e63b9..3edefc5 100644 --- a/decoders/wiegand/pd.py +++ b/decoders/wiegand/pd.py @@ -105,7 +105,7 @@ class Decoder(srd.Decoder): def decode(self): while True: # TODO: Come up with more appropriate self.wait() conditions. - (d0, d1) = self.wait({'skip': 1}) + (d0, d1) = self.wait() if d0 == self._d0_prev and d1 == self._d1_prev: if self.es_bit and self.samplenum >= self.es_bit: -- cgit v1.2.3-70-g09d2