]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/pan1321/pan1321.py
srd: uart: Use strings for packet types.
[libsigrokdecode.git] / decoders / pan1321 / pan1321.py
index 9c22637d1709b81a1a564ae02cf70853b195b3a8..e89b6a0f8097b9440de071891466a61dc0dbe508 100644 (file)
@@ -29,9 +29,6 @@ import sigrokdecode as srd
 # Annotation feed formats
 ANN_ASCII = 0
 
-# UART 'data' packet type.
-T_DATA = 1
-
 # ...
 RX = 0
 TX = 1
@@ -97,7 +94,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.