summaryrefslogtreecommitdiff
path: root/decoders/rgb_led_ws281x/pd.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2016-05-19 18:38:05 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2016-05-26 19:15:19 +0200
commit5b0b88ced37e8fbe3031867255412f449245ca26 (patch)
tree430b089db720b991e5431e54edc43e519b018837 /decoders/rgb_led_ws281x/pd.py
parent135b790c851c52400279e7c932e1f900d91ae5cc (diff)
downloadlibsigrokdecode-5b0b88ced37e8fbe3031867255412f449245ca26.tar.gz
libsigrokdecode-5b0b88ced37e8fbe3031867255412f449245ca26.zip
Consistency renames of {ss,es}_ variables.
Diffstat (limited to 'decoders/rgb_led_ws281x/pd.py')
-rw-r--r--decoders/rgb_led_ws281x/pd.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/decoders/rgb_led_ws281x/pd.py b/decoders/rgb_led_ws281x/pd.py
index 439f736..6f65960 100644
--- a/decoders/rgb_led_ws281x/pd.py
+++ b/decoders/rgb_led_ws281x/pd.py
@@ -49,7 +49,7 @@ class Decoder(srd.Decoder):
def __init__(self):
self.samplerate = None
self.oldpin = None
- self.packet_ss = None
+ self.ss_packet = None
self.ss = None
self.es = None
self.bits = []
@@ -66,10 +66,10 @@ class Decoder(srd.Decoder):
if len(self.bits) == 24:
grb = reduce(lambda a, b: (a << 1) | b, self.bits)
rgb = (grb & 0xff0000) >> 8 | (grb & 0x00ff00) << 8 | (grb & 0x0000ff)
- self.put(self.packet_ss, samplenum, self.out_ann,
+ self.put(self.ss_packet, samplenum, self.out_ann,
[2, ['#%06x' % rgb]])
self.bits = []
- self.packet_ss = None
+ self.ss_packet = None
def decode(self, ss, es, data):
if not self.samplerate:
@@ -98,7 +98,7 @@ class Decoder(srd.Decoder):
self.inreset = True
self.bits = []
- self.packet_ss = None
+ self.ss_packet = None
self.ss = None
if not self.oldpin and pin:
@@ -115,8 +115,8 @@ class Decoder(srd.Decoder):
self.bits.append(bit_)
self.handle_bits(samplenum)
- if self.packet_ss is None:
- self.packet_ss = samplenum
+ if self.ss_packet is None:
+ self.ss_packet = samplenum
self.ss = samplenum