Skip to content

Commit

Permalink
Cadillac: better ignition logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Commaremote committed May 29, 2018
1 parent d176220 commit 69be556
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion board/safety/safety_cadillac.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ static void cadillac_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
int bus_number = (to_push->RDTR >> 4) & 0xFF;
uint32_t addr = to_push->RIR >> 21;

if ((addr == 0x135) && (bus_number == 0)) {
// this message isn't all zeros when car is on
if ((addr == 0x160) && (bus_number == 0) && to_push->RDLR) {
cadillac_can_seen = 1;
cadillac_ts_last = TIM2->CNT; // reset timer when gear msg is received
}
Expand Down

0 comments on commit 69be556

Please sign in to comment.