From 89753b619444e46dae1f7649ab82e8a7a5edaf49 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Tue, 25 Aug 2026 17:46:33 -0500 Subject: [PATCH] honda: enable only contributor-verified Bosch-A radar Trust the contributor's plain Bosch Civic road validation while keeping every other Bosch-A variant unavailable until it has an accepted capture. Keep the internal kill switch default-on only behind the verified platform gate. Co-authored-by: JamesL787 --- common/params_keys.h | 4 ++-- opendbc_repo/opendbc/car/honda/interface.py | 4 +++- opendbc_repo/opendbc/car/honda/tests/test_bosch_a_radar.py | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/params_keys.h b/common/params_keys.h index f67779851..dcdc95e7d 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -62,8 +62,8 @@ inline static std::unordered_map keys = { {"GsmRoaming", {PERSISTENT, BOOL}}, {"HardwareSerial", {PERSISTENT, STRING}}, {"HasAcceptedTerms", {PERSISTENT, STRING, "0"}}, - // Developer-only while each Bosch-A platform is being verified against real captures. - {"HondaBoschARadar", {PERSISTENT, BOOL, "0"}}, + // Internal kill switch; the platform verification allowlist remains the hard safety gate. + {"HondaBoschARadar", {PERSISTENT, BOOL, "1"}}, {"HondaGasFactorParams", {PERSISTENT, FLOAT}}, {"HondaLateralPidKiScale", {PERSISTENT, FLOAT, "1.0", "1.0", 3}}, {"HondaLateralPidKpScale", {PERSISTENT, FLOAT, "1.0", "1.0", 3}}, diff --git a/opendbc_repo/opendbc/car/honda/interface.py b/opendbc_repo/opendbc/car/honda/interface.py index 03be29541..68c21bc50 100644 --- a/opendbc_repo/opendbc/car/honda/interface.py +++ b/opendbc_repo/opendbc/car/honda/interface.py @@ -48,7 +48,9 @@ class CarInterface(CarInterfaceBase): # HONDA_BOSCH_A describes the physical harness family. Radar remains unavailable until the # exact platform is added to HONDA_BOSCH_A_RADAR_VERIFIED after real-capture validation. try: - bosch_a_radar_tryout = not docs and Params().get_bool("HondaBoschARadar") + # The explicit default keeps the verified platform usable on installs that have not yet + # persisted the internal kill-switch parameter; the verified-platform set remains mandatory. + bosch_a_radar_tryout = not docs and Params().get_bool("HondaBoschARadar", default=True) except UnknownKeyName: bosch_a_radar_tryout = False ret.radarUnavailable = not (candidate in HONDA_BOSCH_A and diff --git a/opendbc_repo/opendbc/car/honda/tests/test_bosch_a_radar.py b/opendbc_repo/opendbc/car/honda/tests/test_bosch_a_radar.py index dc2c1b828..07de1243e 100644 --- a/opendbc_repo/opendbc/car/honda/tests/test_bosch_a_radar.py +++ b/opendbc_repo/opendbc/car/honda/tests/test_bosch_a_radar.py @@ -1164,10 +1164,11 @@ def test_bosch_a_toggle_can_close_verified_platform(monkeypatch): Params().put_bool("HondaBoschARadar", original) -def test_bosch_a_toggle_defaults_off(): +def test_bosch_a_toggle_defaults_on_but_allowlist_still_gates_platforms(): original = Params().get_bool("HondaBoschARadar") try: Params().remove("HondaBoschARadar") - assert Params().get_bool("HondaBoschARadar") is False + assert CarInterface.get_non_essential_params(CAR.HONDA_CIVIC_BOSCH).radarUnavailable is False + assert CarInterface.get_non_essential_params(CAR.HONDA_ACCORD).radarUnavailable is True finally: Params().put_bool("HondaBoschARadar", original)