From ada8b49cb5940d306c529156622022be2d7fdaa2 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 14 Apr 2023 01:51:19 -0700 Subject: [PATCH] Honda Bosch Radarless: allow alt brake (#1341) * radarless can use this * fix addr check * update opendbc ref --- Dockerfile | 2 +- board/safety/safety_honda.h | 5 +++-- tests/safety/test_honda.py | 4 ---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 235476b5c..00983344e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" ENV PANDA_PATH=/tmp/openpilot/panda ENV OPENPILOT_REF="ee0dd36a3c775dbd82493c84f4e7272c1eb3fcbd" -ENV OPENDBC_REF="e8e97fcf00be9a696be009aa37ca13c55b9f632c" +ENV OPENDBC_REF="3c81860270e918d1a08f14a833522fd798aa39ca" COPY requirements.txt /tmp/ RUN pyenv install 3.8.10 && \ diff --git a/board/safety/safety_honda.h b/board/safety/safety_honda.h index c0a73459a..26a20bb6d 100644 --- a/board/safety/safety_honda.h +++ b/board/safety/safety_honda.h @@ -39,7 +39,8 @@ AddrCheckStruct honda_common_addr_checks[] = { {.msg = {{0x1A6, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 40000U}, // SCM_BUTTONS {0x296, 0, 4, .check_checksum = true, .max_counter = 3U, .expected_timestep = 40000U}, { 0 }}}, {.msg = {{0x158, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}, { 0 }, { 0 }}}, // ENGINE_DATA - {.msg = {{0x17C, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}, { 0 }, { 0 }}}, // POWERTRAIN_DATA + {.msg = {{0x17C, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}, // POWERTRAIN_DATA + {0x1BE, 0, 3, .check_checksum = true, .max_counter = 3U, .expected_timestep = 20000U}, { 0 }}}, // BRAKE_MODULE (for bosch radarless) {.msg = {{0x326, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 100000U}, { 0 }, { 0 }}}, // SCM_FEEDBACK }; #define HONDA_COMMON_ADDR_CHECKS_LEN (sizeof(honda_common_addr_checks) / sizeof(honda_common_addr_checks[0])) @@ -397,7 +398,7 @@ static const addr_checks* honda_bosch_init(uint16_t param) { honda_hw = HONDA_BOSCH; honda_bosch_radarless = GET_FLAG(param, HONDA_PARAM_RADARLESS); // Checking for alternate brake override from safety parameter - honda_alt_brake_msg = GET_FLAG(param, HONDA_PARAM_ALT_BRAKE) && !honda_bosch_radarless; + honda_alt_brake_msg = GET_FLAG(param, HONDA_PARAM_ALT_BRAKE); // radar disabled so allow gas/brakes #ifdef ALLOW_DEBUG diff --git a/tests/safety/test_honda.py b/tests/safety/test_honda.py index f98186703..8e6bed0f8 100755 --- a/tests/safety/test_honda.py +++ b/tests/safety/test_honda.py @@ -524,10 +524,6 @@ class TestHondaBoschRadarlessSafetyBase(TestHondaBoschSafetyBase): self.packer = CANPackerPanda("honda_civic_ex_2022_can_generated") self.safety = libpanda_py.libpanda - # These cars do not have 0x1BE (BRAKE_MODULE) - def test_alt_disengage_on_brake(self): - pass - class TestHondaBoschRadarlessSafety(HondaPcmEnableBase, TestHondaBoschRadarlessSafetyBase): """