Skip to content

Commit 4ce60f3

Browse files
committed
PSA ignition with 0x432
1 parent b7dacfe commit 4ce60f3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

board/drivers/can_common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ void ignition_can_hook(CANPacket_t *msg) {
202202
}
203203

204204
// PSA exception
205-
if ((msg->addr == 0x2f5) && (len == 7)) {
206-
int counter = msg->data[0] & 0xFU;
205+
if ((msg->addr == 0x432) && (len == 8)) {
206+
int counter = msg->data[1] & 0xFU;
207207

208208
static int prev_counter_psa = -1;
209209
if ((counter == ((prev_counter_psa + 1) % 16)) && (prev_counter_psa != -1)) {
210-
// STEERING->IGNITION
211-
ignition_can = ((msg->data[2] >> 5) & 0x1U);
210+
// Dat_BSI1->P369_Com_stElecNetRaw
211+
ignition_can = (msg->data[7] >> 4) == 0x5U;
212212
ignition_can_cnt = 0U;
213213
}
214214
prev_counter_psa = counter;

0 commit comments

Comments
 (0)