From: Philipp Marek Date: Wed, 6 Nov 2019 18:26:49 +0000 (+0100) Subject: ws281x: Check for "None" before subtracting. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3bf6bf42536d5bb374be89fb50e2a2088371eee5;p=libsigrokdecode.git ws281x: Check for "None" before subtracting. --- 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.