]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/usb_packet/pd.py
usb_packet: handle errors from usb_signalling
[libsigrokdecode.git] / decoders / usb_packet / pd.py
index 7120d52932824d073269d0c58628fac64ce4bbca..3e061c9ccf3edad7a4cac625c30cd00ae74ecac2 100644 (file)
@@ -371,7 +371,7 @@ class Decoder(srd.Decoder):
         (ptype, pdata) = data
 
         # We only care about certain packet types for now.
-        if ptype not in ('SOP', 'BIT', 'EOP'):
+        if ptype not in ('SOP', 'BIT', 'EOP', 'ERR'):
             return
 
         # State machine.
@@ -383,7 +383,7 @@ class Decoder(srd.Decoder):
         elif self.state == 'GET BIT':
             if ptype == 'BIT':
                 self.bits.append([pdata, ss, es])
-            elif ptype == 'EOP':
+            elif ptype == 'EOP' or ptype == 'ERR':
                 self.es_packet = es
                 self.handle_packet()
                 self.packet, self.packet_summary = [], ''