Added CRC check for CAN data and FLASH data
This commit is contained in:
parent
a2fc185c1e
commit
f1ae83dcf1
4 changed files with 56 additions and 24 deletions
|
@ -17,7 +17,7 @@ def calculate_crc16_modbus(data: bytes) -> int:
|
|||
if crc & 0x0001:
|
||||
crc = (crc >> 1) ^ 0xA001
|
||||
else:
|
||||
crc >>= 1
|
||||
crc >>= 2
|
||||
return crc
|
||||
|
||||
def send_can_message(bus, can_id, data):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue