]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/pan1321.py
srd: decoders: Metadata consistency fixes/updates.
[libsigrokdecode.git] / decoders / pan1321.py
index 3c093108b64dd3dbf8e77afe8aa49baee0b696ae..601fcfd44dc5acf2122a7549760d5dcf0bf43f00 100644 (file)
@@ -22,7 +22,7 @@
 # TODO
 #
 
-import sigrokdecode
+import sigrokdecode as srd
 
 # Annotation feed formats
 ANN_ASCII = 0
@@ -30,7 +30,7 @@ ANN_ASCII = 0
 # UART 'data' packet type.
 T_DATA = 1
 
-class Decoder(sigrokdecode.Decoder):
+class Decoder(srd.Decoder):
     id = 'pan1321'
     name = 'Panasonic PAN1321'
     longname = 'TODO.'
@@ -41,23 +41,19 @@ class Decoder(sigrokdecode.Decoder):
     license = 'gplv2+'
     inputs = ['uart']
     outputs = ['pan1321']
-    # probes = [
-    # ]
-    options = {
-    }
-    annotation = [
+    probes = []
+    options = {}
+    annotations = [
         # ANN_ASCII
-        ["ASCII", "TODO: description"],
+        ['ASCII', 'TODO: description'],
     ]
 
     def __init__(self, **kwargs):
-        # self.out_proto = None
-        self.out_ann = None
         self.cmd = ''
 
     def start(self, metadata):
-        # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTO, 'pan1321')
-        self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANN, 'pan1321')
+        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'pan1321')
+        self.out_ann = self.add(srd.OUTPUT_ANN, 'pan1321')
 
     def report(self):
         pass