X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmodbus%2Fpd.py;h=d2307b9ec5506855331131c2e0d035b2dafc088d;hb=4ccebbd355fb53177dcc46476a5e5105f4859410;hp=3420f99db419f33afdc873082b6d79376c50daf7;hpb=92b7b49f6964f57a7d6fc4473645c993cfa4ba52;p=libsigrokdecode.git diff --git a/decoders/modbus/pd.py b/decoders/modbus/pd.py index 3420f99..d2307b9 100644 --- a/decoders/modbus/pd.py +++ b/decoders/modbus/pd.py @@ -811,7 +811,7 @@ class Modbus_ADU_CS(Modbus_ADU): self.check_crc(bytecount + 12) class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'modbus' name = 'Modbus' longname = 'Modbus RTU over RS232/RS485' @@ -847,6 +847,9 @@ class Decoder(srd.Decoder): ) def __init__(self): + self.reset() + + def reset(self): self.ADUSc = None # Start off with empty slave -> client ADU. self.ADUCs = None # Start off with empty client -> slave ADU.