summaryrefslogtreecommitdiff
path: root/decoders/rgb_led_spi
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-10-13 17:05:07 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-10-13 17:07:14 +0200
commit486b19ce017c6663be6574dacd0c823304903bca (patch)
tree3c447933be4e4793cc0c26993cf294f3575ef4cd /decoders/rgb_led_spi
parent95d11271b46a46788d497481d03177e883c8554e (diff)
downloadlibsigrokdecode-486b19ce017c6663be6574dacd0c823304903bca.tar.gz
libsigrokdecode-486b19ce017c6663be6574dacd0c823304903bca.zip
All PDs: More consistent names for ss/es variables.
Use self.ss/self.es, or if there's a need to differentiate them a bit more, use self.ss_<suffix>/self.es_<suffix> consistently. Also, drop some unused variables.
Diffstat (limited to 'decoders/rgb_led_spi')
-rw-r--r--decoders/rgb_led_spi/pd.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/rgb_led_spi/pd.py b/decoders/rgb_led_spi/pd.py
index d7d8e58..4749e45 100644
--- a/decoders/rgb_led_spi/pd.py
+++ b/decoders/rgb_led_spi/pd.py
@@ -34,14 +34,14 @@ class Decoder(srd.Decoder):
)
def __init__(self, **kwargs):
- self.cmd_ss, self.cmd_es = 0, 0
+ self.ss_cmd, self.es_cmd = 0, 0
self.mosi_bytes = []
def start(self):
self.out_ann = self.register(srd.OUTPUT_ANN)
def putx(self, data):
- self.put(self.cmd_ss, self.cmd_es, self.out_ann, data)
+ self.put(self.ss_cmd, self.es_cmd, self.out_ann, data)
def decode(self, ss, es, data):
ptype, mosi, miso = data
@@ -52,7 +52,7 @@ class Decoder(srd.Decoder):
self.ss, self.es = ss, es
if len(self.mosi_bytes) == 0:
- self.cmd_ss = ss
+ self.ss_cmd = ss
self.mosi_bytes.append(mosi)
# RGB value == 3 bytes
@@ -62,6 +62,6 @@ class Decoder(srd.Decoder):
red, green, blue = self.mosi_bytes
rgb_value = int(red) << 16 | int(green) << 8 | int(blue)
- self.cmd_es = es
+ self.es_cmd = es
self.putx([0, ['#%.6x' % rgb_value]])
self.mosi_bytes = []