Move location of can_bus_alive check

This commit is contained in:
Daniel 2024-05-29 21:55:03 +03:00
parent a3dbe103c3
commit 22d2aafb99

View file

@ -336,9 +336,9 @@ void update_values_battery() { /* This function maps all the values fetched via
}
void receive_can_battery(CAN_frame_t rx_frame) {
can_bus_alive = true;
switch (rx_frame.MsgID) {
case 0x1DB:
can_bus_alive = true;
if (is_message_corrupt(rx_frame)) {
datalayer.battery.status.CAN_error_counter++;
break; //Message content malformed, abort reading data from it