From 348a3d29dd95fe283bd17cb1b01bfd354226c7aa Mon Sep 17 00:00:00 2001 From: vanillagorillaa Date: Fri, 24 Dec 2021 02:11:35 +0000 Subject: [PATCH] move to cam --- selfdrive/car/honda/carstate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 2fda5868e7..84b138452d 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -271,8 +271,12 @@ class CarState(CarStateBase): if self.CP.carFingerprint in HONDA_BOSCH or self.CP.carFingerprint in HONDA_RADARLESS: if not self.CP.openpilotLongitudinalControl: - ret.cruiseState.nonAdaptive = cp.vl["ACC_HUD"]["CRUISE_CONTROL_LABEL"] != 0 - ret.cruiseState.standstill = cp.vl["ACC_HUD"]["CRUISE_SPEED"] == 252. + if self.CP.carFingerprint in (CAR.CIVIC_22): + ret.cruiseState.nonAdaptive = cp_cam.vl["ACC_HUD"]["CRUISE_CONTROL_LABEL"] != 0 + ret.cruiseState.standstill = cp_cam.vl["ACC_HUD"]["CRUISE_SPEED"] == 252. + else: + ret.cruiseState.nonAdaptive = cp.vl["ACC_HUD"]["CRUISE_CONTROL_LABEL"] != 0 + ret.cruiseState.standstill = cp.vl["ACC_HUD"]["CRUISE_SPEED"] == 252. # On set, cruise set speed pulses between 254~255 and the set speed prev is set to avoid this. if self.CP.carFingerprint in (CAR.CIVIC_22):