]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/pan1321/pan1321.py
srd: onewire: Fix incorrect format for annotation output.
[libsigrokdecode.git] / decoders / pan1321 / pan1321.py
index 13f1226f4a80b624ec157345681abfe4acbef795..da981f25438f098734c18d12fa26fc4977923f4f 100644 (file)
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-#
 # Panasonic PAN1321 Bluetooth module protocol decoder
-#
-# TODO
-#
 
 import sigrokdecode as srd
 
-# Annotation feed formats
-ANN_ASCII = 0
-
-# UART 'data' packet type.
-T_DATA = 1
-
 # ...
 RX = 0
 TX = 1
@@ -41,16 +31,15 @@ class Decoder(srd.Decoder):
     id = 'pan1321'
     name = 'PAN1321'
     longname = 'Panasonic PAN1321'
-    desc = 'TODO.'
-    longdesc = 'TODO.'
+    desc = 'Bluetooth RF module with Serial Port Profile (SPP).'
     license = 'gplv2+'
     inputs = ['uart']
     outputs = ['pan1321']
     probes = []
-    extra_probes = []
+    optional_probes = []
     options = {}
     annotations = [
-        ['ASCII', 'TODO: description'],
+        ['Text', 'Human-readable text'],
     ]
 
     def __init__(self, **kwargs):
@@ -97,7 +86,7 @@ class Decoder(srd.Decoder):
         ptype, rxtx, pdata = data
 
         # For now, ignore all UART packets except the actual data packets.
-        if ptype != T_DATA:
+        if ptype != 'DATA':
             return
 
         # Append a new (ASCII) byte to the currently built/parsed command.