Skip to content

Commit

Permalink
disabling lkas again on toyota temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
devtekve committed Dec 5, 2024
1 parent bf1ca4a commit c6615de
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ static bool toyota_get_quality_flag_valid(const CANPacket_t *to_push) {
static void toyota_rx_hook(const CANPacket_t *to_push) {
const int TOYOTA_LTA_MAX_ANGLE = 1657; // EPS only accepts up to 94.9461

if (GET_BUS(to_push) == 2U) {
int addr = GET_ADDR(to_push);

if (addr == 0x412) {
bool lkas_hud_visible = (GET_BYTE(to_push, 0U) & 0xC0U) > 0U;
if (lkas_hud_visible) {
lkas_button_press = MADS_BUTTON_PRESSED;
}
}
}
// if (GET_BUS(to_push) == 2U) {
// int addr = GET_ADDR(to_push);
//
// if (addr == 0x412) {
// bool lkas_hud_visible = (GET_BYTE(to_push, 0U) & 0xC0U) > 0U;
// if (lkas_hud_visible) {
// lkas_button_press = MADS_BUTTON_PRESSED;
// }
// }
// }

if (GET_BUS(to_push) == 0U) {
int addr = GET_ADDR(to_push);
Expand Down

0 comments on commit c6615de

Please sign in to comment.