From 486b19ce017c6663be6574dacd0c823304903bca Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 13 Oct 2014 17:05:07 +0200 Subject: 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_/self.es_ consistently. Also, drop some unused variables. --- decoders/rgb_led_spi/pd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'decoders/rgb_led_spi') 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 = [] -- cgit v1.2.3-70-g09d2