From fc35db75b202d3020df27d871283d093f28b8802 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 12 Mar 2024 23:42:34 -0700 Subject: [PATCH] Honda Bosch Radarless: check nonAdaptive at all times (#31853) * doesn't work * Revert "doesn't work" This reverts commit 7a3587b60b65ed0525a9d658e676465ca8ecbef9. * always add to can parser * not sure if this is clean * minimal diff version, but more lines! old-commit-hash: e34432160a8f583c757d867a4d09bf213b5da71d --- selfdrive/car/honda/carstate.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 7784581e1c..d429da33fb 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -204,6 +204,10 @@ class CarState(CarStateBase): ret.steeringPressed = abs(ret.steeringTorque) > STEER_THRESHOLD.get(self.CP.carFingerprint, 1200) if self.CP.carFingerprint in HONDA_BOSCH: + # The PCM always manages its own cruise control state, but doesn't publish it + if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS: + ret.cruiseState.nonAdaptive = cp_cam.vl["ACC_HUD"]["CRUISE_CONTROL_LABEL"] != 0 + if not self.CP.openpilotLongitudinalControl: # ACC_HUD is on camera bus on radarless cars acc_hud = cp_cam.vl["ACC_HUD"] if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS else cp.vl["ACC_HUD"] @@ -276,9 +280,10 @@ class CarState(CarStateBase): ] if CP.carFingerprint in HONDA_BOSCH_RADARLESS: - messages.append(("LKAS_HUD", 10)) - if not CP.openpilotLongitudinalControl: - messages.append(("ACC_HUD", 10)) + messages += [ + ("ACC_HUD", 10), + ("LKAS_HUD", 10), + ] elif CP.carFingerprint not in HONDA_BOSCH: messages += [