]> 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 b5f61b8d533c21424b2a27ce7970f6a593e1ff05..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,12 +29,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2'
     inputs = ['spi']
     outputs = ['rgb_led_spi']
-    probes = []
-    optional_probes = []
-    options = {}
-    annotations = [
-        ['rgb', 'RGB values'],
-    ]
+    annotations = (
+        ('rgb', 'RGB values'),
+    )
 
     def __init__(self, **kwargs):
         self.cmd_ss, self.cmd_es = 0, 0
@@ -68,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 = []