Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions board/drivers/can_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ void ignition_can_hook(CANPacket_t *msg) {
ignition_can_cnt = 0U;
}

// PSA exception
if ((msg->addr == 0x432) && (len == 8)) {
int counter = msg->data[1] & 0xFU;

static int prev_counter_psa = -1;
if ((counter == ((prev_counter_psa + 1) % 16)) && (prev_counter_psa != -1)) {
// Dat_BSI1->P369_Com_stElecNetRaw
ignition_can = (msg->data[7] >> 4) == 0x5U;
ignition_can_cnt = 0U;
}
prev_counter_psa = counter;
}

}
}

Expand Down
Loading