diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-07-15 22:49:43 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-07-15 22:49:43 +0200 |
commit | 35b380b1156434b73d4a976c68f5ab3604c8510a (patch) | |
tree | 75a60785c37d242eee5886af138dba5ef0f177c1 /decoders/rgb_led_spi | |
parent | 22fc7ace72f3165c98208a8f544156e04a709639 (diff) | |
download | libsigrokdecode-35b380b1156434b73d4a976c68f5ab3604c8510a.tar.gz libsigrokdecode-35b380b1156434b73d4a976c68f5ab3604c8510a.zip |
All PDs: Minor whitespace and consistency fixes.
- No newlines at the end of files.
- No trailing ';' characters.
- Comparison with None: Use 'is None' or 'is not None'.
- Comparison with True/False: Use 'if cond:' or 'if not cond:'.
- Various minor whitespace fixes.
Diffstat (limited to 'decoders/rgb_led_spi')
-rw-r--r-- | decoders/rgb_led_spi/__init__.py | 1 | ||||
-rw-r--r-- | decoders/rgb_led_spi/pd.py | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/decoders/rgb_led_spi/__init__.py b/decoders/rgb_led_spi/__init__.py index 3d41ea5..a5a7ad6 100644 --- a/decoders/rgb_led_spi/__init__.py +++ b/decoders/rgb_led_spi/__init__.py @@ -24,4 +24,3 @@ values that are clocked over SPI in RGB values. ''' from .pd import * - diff --git a/decoders/rgb_led_spi/pd.py b/decoders/rgb_led_spi/pd.py index ca0b113..d7d8e58 100644 --- a/decoders/rgb_led_spi/pd.py +++ b/decoders/rgb_led_spi/pd.py @@ -60,9 +60,7 @@ class Decoder(srd.Decoder): return red, green, blue = self.mosi_bytes - rgb_value = int(red) << 16 - rgb_value |= int(green) << 8 - rgb_value |= int(blue) + rgb_value = int(red) << 16 | int(green) << 8 | int(blue) self.cmd_es = es self.putx([0, ['#%.6x' % rgb_value]]) |