From 3e429ac0f8607e8558c51d7ae1a6279d276d1523 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 2 Aug 2023 21:09:09 -0700 Subject: [PATCH] Honda: remove duplicated relay transition time check (#1544) already checked --- board/safety/safety_honda.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/board/safety/safety_honda.h b/board/safety/safety_honda.h index e8100cad72..83e671a5d3 100644 --- a/board/safety/safety_honda.h +++ b/board/safety/safety_honda.h @@ -235,20 +235,18 @@ static int honda_rx_hook(CANPacket_t *to_push) { int bus_rdr_car = (honda_hw == HONDA_BOSCH) ? 0 : 2; // radar bus, car side bool stock_ecu_detected = false; - if (safety_mode_cnt > RELAY_TRNS_TIMEOUT) { - // If steering controls messages are received on the destination bus, it's an indication - // that the relay might be malfunctioning - if ((addr == 0xE4) || (addr == 0x194)) { - if (((honda_hw != HONDA_NIDEC) && (bus == bus_rdr_car)) || ((honda_hw == HONDA_NIDEC) && (bus == 0))) { - stock_ecu_detected = true; - } - } - // If Honda Bosch longitudinal mode is selected we need to ensure the radar is turned off - // Verify this by ensuring ACC_CONTROL (0x1DF) is not received on the PT bus - if (honda_bosch_long && !honda_bosch_radarless && (bus == pt_bus) && (addr == 0x1DF)) { + // If steering controls messages are received on the destination bus, it's an indication + // that the relay might be malfunctioning + if ((addr == 0xE4) || (addr == 0x194)) { + if (((honda_hw != HONDA_NIDEC) && (bus == bus_rdr_car)) || ((honda_hw == HONDA_NIDEC) && (bus == 0))) { stock_ecu_detected = true; } } + // If Honda Bosch longitudinal mode is selected we need to ensure the radar is turned off + // Verify this by ensuring ACC_CONTROL (0x1DF) is not received on the PT bus + if (honda_bosch_long && !honda_bosch_radarless && (bus == pt_bus) && (addr == 0x1DF)) { + stock_ecu_detected = true; + } generic_rx_checks(stock_ecu_detected); }