diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2017-06-18 19:27:47 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-06-21 17:45:15 +0200 |
commit | 1b9ef18be867133e721681cbc20272cf5c669504 (patch) | |
tree | c4854dc5d70fd4a4a1b603b9639694bbf5c8ae69 /decoders/rgb_led_ws281x | |
parent | 6e19f3257d896cfa8c1afffbdbf58a88fa3b9327 (diff) | |
download | libsigrokdecode-1b9ef18be867133e721681cbc20272cf5c669504.tar.gz libsigrokdecode-1b9ef18be867133e721681cbc20272cf5c669504.zip |
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.
Diffstat (limited to 'decoders/rgb_led_ws281x')
-rw-r--r-- | decoders/rgb_led_ws281x/pd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoders/rgb_led_ws281x/pd.py b/decoders/rgb_led_ws281x/pd.py index ca35283..5cf2124 100644 --- a/decoders/rgb_led_ws281x/pd.py +++ b/decoders/rgb_led_ws281x/pd.py @@ -76,7 +76,7 @@ class Decoder(srd.Decoder): while True: # TODO: Come up with more appropriate self.wait() conditions. - (pin,) = self.wait({'skip': 1}) + (pin,) = self.wait() if self.oldpin is None: self.oldpin = pin |