@ -142,7 +142,7 @@ class CarController(CarControllerBase):
# Press distance button until we are at the correct bar length. Only change while enabled to avoid skipping startup popup
if self.frame % 6 == 0:
desired_distance = 4 - hud_control.distanceBars
desired_distance = 4 - hud_control.leadDistanceBars
if CS.pcm_follow_distance != desired_distance and CS.out.cruiseState.enabled and self.CP.carFingerprint not in UNSUPPORTED_DSU_CAR:
self.distance_button = not self.distance_button
else:
@ -44,7 +44,6 @@ class CarState(CarStateBase):
self.distance_button = 0
self.pcm_follow_distance = 0
self.pcm_follow_distance_values = can_define.dv['PCM_CRUISE_2']['PCM_FOLLOW_DISTANCE']
self.low_speed_lockout = False
self.acc_type = 1
@ -680,7 +680,7 @@ class Controls:
hudControl.speedVisible = self.enabled
hudControl.lanesVisible = self.enabled
hudControl.leadVisible = self.sm['longitudinalPlan'].hasLead
hudControl.distanceBars = self.sm['longitudinalPlan'].personality.raw + 1
hudControl.leadDistanceBars = self.sm['longitudinalPlan'].personality.raw + 1
hudControl.rightLaneVisible = True
hudControl.leftLaneVisible = True