From 793a7c77ad3c5afada8543086ef130d8528b9e68 Mon Sep 17 00:00:00 2001 From: jakethesake420 Date: Wed, 25 Sep 2024 08:48:19 -0500 Subject: [PATCH] mazda panda ignition --- panda/board/drivers/can_common.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panda/board/drivers/can_common.h b/panda/board/drivers/can_common.h index 55d9985af..c54e587ce 100644 --- a/panda/board/drivers/can_common.h +++ b/panda/board/drivers/can_common.h @@ -200,7 +200,7 @@ void ignition_can_hook(CANPacket_t *to_push) { if (bus == 0) { int addr = GET_ADDR(to_push); int len = GET_LEN(to_push); - + // GM exception if ((addr == 0x1F1) && (len == 8)) { // SystemPowerMode (2=Run, 3=Crank Request) @@ -220,6 +220,11 @@ void ignition_can_hook(CANPacket_t *to_push) { ignition_can = (GET_BYTE(to_push, 0) >> 5) == 0x6U; ignition_can_cnt = 0U; } + // Mazda 2019 exception + if ((addr == 0x274) && (len == 8)) { + ignition_can = (GET_BYTE(to_push, 5) & 0x4U) != 0U; + ignition_can_cnt = 0U; + } } else if (bus == 2) { int addr = GET_ADDR(to_push);