diff --git a/board/safety/safety_hyundai_common.h b/board/safety/safety_hyundai_common.h index 21e6df3600..4bef6c0648 100644 --- a/board/safety/safety_hyundai_common.h +++ b/board/safety/safety_hyundai_common.h @@ -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) { diff --git a/board/safety/safety_toyota.h b/board/safety/safety_toyota.h index a90d5b1760..3c78bd84ef 100644 --- a/board/safety/safety_toyota.h +++ b/board/safety/safety_toyota.h @@ -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(); } }