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 <jamezelle1@gmail.com>
This commit is contained in:
firestar5683
2026-08-25 17:46:33 -05:00
parent 0b9298e363
commit 89753b6194
3 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> 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}},
+3 -1
View File
@@ -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
@@ -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)