Skip to content

Commit ace232a

Browse files
author
Commaremote
committed
Cadillac: ignition bug
1 parent e2c89d6 commit ace232a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

board/safety/safety_cadillac.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const int CADILLAC_IGNITION_TIMEOUT = 1000000;
1+
const int CADILLAC_IGNITION_TIMEOUT = 1000000; // 1s
22
int cadillac_can_seen = 0;
33
uint32_t cadillac_ts_last = 0;
44

@@ -20,6 +20,7 @@ static int cadillac_ign_hook() {
2020
uint32_t ts = TIM2->CNT;
2121
uint32_t ts_elapsed = get_ts_elapsed(ts, cadillac_ts_last);
2222
if ((ts_elapsed > CADILLAC_IGNITION_TIMEOUT) || (!cadillac_can_seen)) {
23+
cadillac_can_seen = 0;
2324
return 0;
2425
}
2526
return 1;

0 commit comments

Comments
 (0)