mirror of https://github.com/rusefi/opendbc.git
add checksum check to can parser for subaru
This commit is contained in:
parent
7f3b1774dd
commit
7456061a71
|
@ -57,6 +57,11 @@ bool MessageState::parse(uint64_t sec, uint16_t ts_, uint8_t * dat) {
|
|||
if (!update_counter_generic(tmp, sig.b2)) {
|
||||
return false;
|
||||
}
|
||||
} else if (sig.type == SignalType::SUBARU_CHECKSUM) {
|
||||
if (subaru_checksum(address, dat_be, size) != tmp) {
|
||||
INFO("0x%X CHECKSUM FAIL\n", address);
|
||||
return false;
|
||||
}
|
||||
} else if (sig.type == SignalType::CHRYSLER_CHECKSUM) {
|
||||
if (chrysler_checksum(address, dat_le, size) != tmp) {
|
||||
INFO("0x%X CHECKSUM FAIL\n", address);
|
||||
|
|
Loading…
Reference in New Issue