From: Stefan BrĂ¼ns Date: Fri, 13 Nov 2015 03:55:56 +0000 (+0100) Subject: usb_signalling: handle symbol errors in EOP state X-Git-Tag: libsigrokdecode-0.4.0~28 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0f274b53a9c0c8a40cdb0ed41023705d99bc6c6c;p=libsigrokdecode.git usb_signalling: handle symbol errors in EOP state Only SE0 and J are valid symbols during EOP --- diff --git a/decoders/usb_signalling/pd.py b/decoders/usb_signalling/pd.py index c00786a..774ed49 100644 --- a/decoders/usb_signalling/pd.py +++ b/decoders/usb_signalling/pd.py @@ -209,6 +209,10 @@ class Decoder(srd.Decoder): self.putm([5, ['EOP', 'E']]) self.state = 'IDLE' self.bitwidth = float(self.samplerate) / float(self.bitrate) + else: + self.putpm(['ERR', None]) + self.putm([8, ['EOP Error', 'EErr', 'E']]) + self.state = 'IDLE' def get_bit(self, sym): if sym == 'SE0':