From 146339fe1415c142d44044fe9dfa2739f73c3fb0 Mon Sep 17 00:00:00 2001 From: royjr Date: Wed, 14 Dec 2022 12:40:30 -0500 Subject: [PATCH] lessest nester --- selfdrive/car/honda/carcontroller.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index aa41658599..4adca700cf 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -130,16 +130,14 @@ class CarController: hud_control = CC.hudControl if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS: + hud_v_cruise = hud_control.setSpeed * (CV.MS_TO_KPH if CS.is_metric else CV.MS_TO_MPH) if hud_control.speedVisible else 255 if CC.longActive and (actuators.longControlState == LongCtrlState.stopping): if self.last_stopping_frame == 0: self.last_stopping_frame = self.frame if self.frame - self.last_stopping_frame > 400: hud_v_cruise = 252 - else: - hud_v_cruise = hud_control.setSpeed * (CV.MS_TO_KPH if CS.is_metric else CV.MS_TO_MPH) if hud_control.speedVisible else 255 else: self.last_stopping_frame = 0 - hud_v_cruise = hud_control.setSpeed * (CV.MS_TO_KPH if CS.is_metric else CV.MS_TO_MPH) if hud_control.speedVisible else 255 else: hud_v_cruise = hud_control.setSpeed * CV.MS_TO_MPH if hud_control.speedVisible else 255 pcm_cancel_cmd = CC.cruiseControl.cancel