summaryrefslogtreecommitdiff
path: root/decoders/rgb_led_ws281x/pd.py
diff options
context:
space:
mode:
authorPhilipp Marek <philipp@marek.priv.at>2019-11-06 19:26:49 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2019-11-29 20:40:56 +0100
commit3bf6bf42536d5bb374be89fb50e2a2088371eee5 (patch)
tree364e8f3e0bd897a8acc3b7362b87719cd7aaf3d4 /decoders/rgb_led_ws281x/pd.py
parente4eeaab3206e757592cea79f4686180bc3ee38e0 (diff)
downloadlibsigrokdecode-3bf6bf42536d5bb374be89fb50e2a2088371eee5.tar.gz
libsigrokdecode-3bf6bf42536d5bb374be89fb50e2a2088371eee5.zip
ws281x: Check for "None" before subtracting.
Diffstat (limited to 'decoders/rgb_led_ws281x/pd.py')
-rw-r--r--decoders/rgb_led_ws281x/pd.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/decoders/rgb_led_ws281x/pd.py b/decoders/rgb_led_ws281x/pd.py
index a6bb356..adf68eb 100644
--- a/decoders/rgb_led_ws281x/pd.py
+++ b/decoders/rgb_led_ws281x/pd.py
@@ -89,6 +89,7 @@ class Decoder(srd.Decoder):
# Check RESET condition (manufacturer recommends 50 usec minimal,
# but real minimum is ~10 usec).
if not self.inreset and not pin and self.es is not None and \
+ self.ss is not None and \
(self.samplenum - self.es) / self.samplerate > 50e-6:
# Decode last bit value.