]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/rgb_led_spi/pd.py
Various PDs: Minor consistency fixes.
[libsigrokdecode.git] / decoders / rgb_led_spi / pd.py
index 1c6112282830cf93f110a3874a25c05d0ceb128f..ca0b1139ab492db03bf58a54fed21b5a04e6868c 100644 (file)
@@ -21,7 +21,7 @@
 import sigrokdecode as srd
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'rgb_led_spi'
     name = 'RGB LED (SPI)'
     longname = 'RGB LED string decoder (SPI)'
@@ -29,9 +29,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2'
     inputs = ['spi']
     outputs = ['rgb_led_spi']
-    annotations = [
-        ['rgb', 'RGB values'],
-    ]
+    annotations = (
+        ('rgb', 'RGB values'),
+    )
 
     def __init__(self, **kwargs):
         self.cmd_ss, self.cmd_es = 0, 0
@@ -65,5 +65,5 @@ class Decoder(srd.Decoder):
         rgb_value |= int(blue)
 
         self.cmd_es = es
-        self.putx([0, ["#%.6x" % rgb_value]])
+        self.putx([0, ['#%.6x' % rgb_value]])
         self.mosi_bytes = []