Revert "protocols: fix off-by-one in payload extraction"
This reverts commit 0e020f2aa4
.
Nothing needed fixing here. This strips off one byte too many.
This commit is contained in:
parent
1ec855e6a1
commit
0d5e8e645f
@ -417,7 +417,7 @@ class Stc89Protocol(StcBaseProtocol):
|
|||||||
raise StcFramingException("packet checksum mismatch")
|
raise StcFramingException("packet checksum mismatch")
|
||||||
|
|
||||||
payload = StcBaseProtocol.extract_payload(self, packet)
|
payload = StcBaseProtocol.extract_payload(self, packet)
|
||||||
return payload[:-2]
|
return payload[:-1]
|
||||||
|
|
||||||
def write_packet(self, packet_data):
|
def write_packet(self, packet_data):
|
||||||
"""Send packet to MCU.
|
"""Send packet to MCU.
|
||||||
@ -812,7 +812,7 @@ class Stc12BaseProtocol(StcBaseProtocol):
|
|||||||
raise StcFramingException("packet checksum mismatch")
|
raise StcFramingException("packet checksum mismatch")
|
||||||
|
|
||||||
payload = StcBaseProtocol.extract_payload(self, packet)
|
payload = StcBaseProtocol.extract_payload(self, packet)
|
||||||
return payload[:-3]
|
return payload[:-2]
|
||||||
|
|
||||||
def write_packet(self, packet_data):
|
def write_packet(self, packet_data):
|
||||||
"""Send packet to MCU.
|
"""Send packet to MCU.
|
||||||
|
Loading…
Reference in New Issue
Block a user