Skip to content

Commit 101238c

Browse files
committed
turned on VW ignition based CAN logic
1 parent a0d8d5d commit 101238c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

board/drivers/can.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -357,13 +357,11 @@ void ignition_can_hook(CAN_FIFOMailBox_TypeDef *to_push) {
357357
// this message isn't all zeros when ignition is on
358358
ignition_can = GET_BYTES_04(to_push) != 0;
359359
}
360-
// VW exception (not used yet)
361-
// While we do monitor VW Terminal 15 (ignition-on) state, we are not currently acting on it. Instead we use the
362-
// default GPIO ignition hook. We may do so in the future for harness integrations at the camera (where we only have
363-
// T30 unswitched power) instead of the gateway (where we have both T30 and T15 ignition-switched power).
364-
//if ((bus == 0) && (addr == 0x3C0)) {
365-
// vw_ignition_started = (GET_BYTE(to_push, 2) & 0x2) >> 1;
366-
//}
360+
// VW exception
361+
if ((addr == 0x3C0) && (len == 4)) {
362+
// VW Terminal 15 (ignition-on) state
363+
ignition_can = (GET_BYTE(to_push, 2) & 0x2) != 0;
364+
}
367365
}
368366
}
369367

0 commit comments

Comments
 (0)