panda: add GM ignition-over-CAN detection on bus 2 (SystemPowerMode 0x1F1)

FrogPilot handles the GM SystemPowerMode message on both bus 0 and bus 2
(SDGM cars send it on bus 2). C3XL-dev only checked bus 0, so GM cars with
0x1F1 on bus 2 never set ignition_can and the device would not auto power-on.
Mirror FrogPilot: check 0x1F1 on bus 2 as well, keep other exceptions bus-0 only.
This commit is contained in:
Comma Device
2026-08-25 11:41:31 +08:00
parent 22191a156d
commit b061d88cfa
6 changed files with 11 additions and 2 deletions
+9
View File
@@ -66,6 +66,15 @@ void ignition_can_hook(const CANPacket_t *msg) {
}
prev_counter_vw_meb = counter;
}
} else if (msg->bus == 2U) {
int len = GET_LEN(msg);
// GM exception: SDGM cars send SystemPowerMode on bus 2
if ((msg->addr == 0x1F1U) && (len == 8)) {
// SystemPowerMode (2=Run, 3=Crank Request)
ignition_can = (msg->data[0] & 0x2U) != 0U;
ignition_can_cnt = 0U;
}
}
// TODO: this is too loose, Teslas have 0x222
+1 -1
View File
@@ -1,2 +1,2 @@
extern const uint8_t gitversion[19];
const uint8_t gitversion[19] = "DEV-f3c371b0-DEBUG";
const uint8_t gitversion[19] = "DEV-22191a15-DEBUG";
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
DEV-f3c371b0-DEBUG
DEV-22191a15-DEBUG