Skip to content

Commit

Permalink
misra
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyhaibin committed Nov 25, 2024
1 parent 7d9218f commit bf702b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion board/safety/safety_hyundai_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ uint32_t hyundai_common_canfd_compute_checksum(const CANPacket_t *to_push) {
return crc;
}

void hyundai_common_reset_acc_main(const int acc_main_on_tx) {
void hyundai_common_reset_acc_main(const bool acc_main_on_tx) {
if (acc_main_on && !acc_main_on_tx) {
acc_main_on_mismatches += 1U;
if (acc_main_on_mismatches >= 25U) {
Expand Down
3 changes: 2 additions & 1 deletion board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ static void toyota_rx_hook(const CANPacket_t *to_push) {
int addr = GET_ADDR(to_push);

if (addr == 0x412) {
lkas_button = (GET_BYTE(to_push, 0U) & 0xC0U) != 0;
uint8_t lkas_hud = GET_BYTE(to_push, 0U) & 0xC0U;
lkas_button = lkas_hud > 0U;
mads_check_lkas_button();
}
}
Expand Down

0 comments on commit bf702b0

Please sign in to comment.