diff --git a/board/drivers/can_common.h b/board/drivers/can_common.h index a3e195fd64..be6b5b2a5d 100644 --- a/board/drivers/can_common.h +++ b/board/drivers/can_common.h @@ -195,24 +195,25 @@ void ignition_can_hook(CANPacket_t *to_push) { int addr = GET_ADDR(to_push); int len = GET_LEN(to_push); - ignition_can_cnt = 0U; // reset counter - if (bus == 0) { // GM exception if ((addr == 0x160) && (len == 5)) { // this message isn't all zeros when ignition is on ignition_can = GET_BYTES(to_push, 0, 4) != 0U; + ignition_can_cnt = 0U; } // Tesla exception if ((addr == 0x348) && (len == 8)) { // GTW_status ignition_can = (GET_BYTE(to_push, 0) & 0x1U) != 0U; + ignition_can_cnt = 0U; } // Mazda exception if ((addr == 0x9E) && (len == 8)) { ignition_can = (GET_BYTE(to_push, 0) >> 5) == 0x6U; + ignition_can_cnt = 0U; } }