From 8967e839a3df6aa8766f57e521c81edd3a12be4d Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 19 Feb 2014 15:07:39 +0100 Subject: rgb_led: Minor cosmetics, whitespace. --- decoders/rgb_led/pd.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'decoders/rgb_led/pd.py') diff --git a/decoders/rgb_led/pd.py b/decoders/rgb_led/pd.py index 38bd64d..f3a6388 100644 --- a/decoders/rgb_led/pd.py +++ b/decoders/rgb_led/pd.py @@ -21,11 +21,11 @@ import sigrokdecode as srd class Decoder(srd.Decoder): - api_version =1 + api_version = 1 id = 'rgb_led' name = 'RGB LED (SPI mode)' longname = 'RGB LED string decoder (SPI mode)' - desc = '' + desc = 'Generic RGB LED string protocol (RGB values clocked over SPI).' license = 'gplv2' inputs = ['spi'] outputs = ['rgb_led'] @@ -33,8 +33,7 @@ class Decoder(srd.Decoder): optional_probes = [] options = {} annotations = [ - ['text', 'Human-readable text'], - ['warnings', 'Human-readable warnings'], + ['rgb', 'RGB values'], ] def __init__(self, **kwargs): @@ -50,7 +49,7 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): ptype, mosi, miso = data - # Only care about data packets + # Only care about data packets. if ptype != 'DATA': return self.ss, self.es = ss, es @@ -63,7 +62,7 @@ class Decoder(srd.Decoder): if len(self.mosi_bytes) != 3: return - red, green, blue = self.mosi_bytes + red, green, blue = self.mosi_bytes rgb_value = int(red) << 16 rgb_value |= int(green) << 8 rgb_value |= int(blue) -- cgit v1.2.3-70-g09d2