summaryrefslogtreecommitdiff
path: root/decoders/usb_signalling/pd.py
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2017-06-18 19:27:47 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2017-06-21 17:45:15 +0200
commit1b9ef18be867133e721681cbc20272cf5c669504 (patch)
treec4854dc5d70fd4a4a1b603b9639694bbf5c8ae69 /decoders/usb_signalling/pd.py
parent6e19f3257d896cfa8c1afffbdbf58a88fa3b9327 (diff)
downloadlibsigrokdecode-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/usb_signalling/pd.py')
-rw-r--r--decoders/usb_signalling/pd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/decoders/usb_signalling/pd.py b/decoders/usb_signalling/pd.py
index ae0f651..7a885c0 100644
--- a/decoders/usb_signalling/pd.py
+++ b/decoders/usb_signalling/pd.py
@@ -302,7 +302,7 @@ class Decoder(srd.Decoder):
raise SamplerateError('Cannot decode without samplerate.')
# Seed internal state from the very first sample.
- pins = self.wait({'skip': 1})
+ pins = self.wait()
sym = symbols[self.options['signalling']][pins]
self.handle_idle(sym)
@@ -330,7 +330,7 @@ class Decoder(srd.Decoder):
self.get_eop(sym)
elif self.state == 'WAIT IDLE':
# Skip "all-low" input. Wait for high level on either DP or DM.
- pins = self.wait({'skip': 1})
+ pins = self.wait()
while not pins[0] and not pins[1]:
pins = self.wait([{0: 'h'}, {1: 'h'}])
if self.samplenum - self.samplenum_lastedge > 1: