X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=decoders%2Fmodbus%2Fpd.py;h=1d012e4560170aa05b3cebfc47defa2f3a9d3b8f;hb=7714a23058fcf1fbffa1208fb02f854947f0617f;hp=cc4272168c28f4a60d633c1554f4340cb1d9071c;hpb=dcf1b50dfe8c66f7a5579856d86e328e02ff986d;p=libsigrokdecode.git diff --git a/decoders/modbus/pd.py b/decoders/modbus/pd.py index cc42721..1d012e4 100644 --- a/decoders/modbus/pd.py +++ b/decoders/modbus/pd.py @@ -929,6 +929,10 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): ptype, rxtx, pdata = data + # Ignore unknown/unsupported ptypes. + if ptype not in ('STARTBIT', 'DATA', 'STOPBIT'): + return + # Decide what ADU(s) we need this packet to go to. # Note that it's possible to go to both ADUs. if rxtx_channels[rxtx] == self.options['scchannel']: