pull/31760/head
Shane Smiskol 2 years ago
parent 1835927a01
commit 11dfeb02d9
  1. 2
      selfdrive/car/toyota/carcontroller.py
  2. 1
      selfdrive/car/toyota/carstate.py
  3. 2
      selfdrive/controls/controlsd.py

@ -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

Loading…
Cancel
Save