Add SDGM support

Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com>
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 0174873f46
commit 9af2cadf3b
9 changed files with 165 additions and 51 deletions

View File

@@ -227,6 +227,13 @@ void ignition_can_hook(CANPacket_t *to_push) {
ignition_can_cnt = 0U;
}
} else if (bus == 2) {
// GM exception, SDGM cars have this message on bus 2
if ((addr == 0x1F1) && (len == 8)) {
// SystemPowerMode (2=Run, 3=Crank Request)
ignition_can = (GET_BYTE(to_push, 0) & 0x2U) != 0U;
ignition_can_cnt = 0U;
}
}
}