pandad: reset CAN comms on checksum failure (#32629)

pull/32605/head
Adeeb Shihadeh 11 months ago committed by GitHub
parent 34e329649d
commit 877b810ac9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      panda
  2. 2
      selfdrive/pandad/panda.cc

@ -1 +1 @@
Subproject commit 77ecf515e55750b1e2dc0fc60b04fe3fd3ec13a3 Subproject commit faa18026692f7714ee537261fe649dafe4882579

@ -246,9 +246,9 @@ bool Panda::unpack_can_buffer(uint8_t *data, uint32_t &size, std::vector<can_fra
} }
if (calculate_checksum(&data[pos], sizeof(can_header) + data_len) != 0) { if (calculate_checksum(&data[pos], sizeof(can_header) + data_len) != 0) {
// TODO: also reset CAN comms?
LOGE("Panda CAN checksum failed"); LOGE("Panda CAN checksum failed");
size = 0; size = 0;
can_reset_communications();
return false; return false;
} }

Loading…
Cancel
Save