mirror of https://github.com/commaai/openpilot.git
longitudinal personality: display in Toyota instrument cluster (#31760)
* start at param
* start by sending personality
* change to personality
* POC: button changes personality
* what's wrong with this?
* fix
* not really possible but fuzzy test catches this
* there's always a typo
* dang, we're dropping messages
* clean up
* no comment
* bump
* rename
* revert longplan
* revert this
* Fix check
* more appropriate up here
* consistenet
* Update selfdrive/car/toyota/carstate.py
* Update ref_commit
old-commit-hash: 2c353a25a4
This commit is contained in:
parent
6e3fd403a5
commit
632fd1d20b
|
@ -141,9 +141,9 @@ class CarController(CarControllerBase):
|
|||
lead = hud_control.leadVisible or CS.out.vEgo < 12. # at low speed we always assume the lead is present so ACC can be engaged
|
||||
|
||||
# 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:
|
||||
if CS.pcm_follow_distance_values.get(CS.pcm_follow_distance, "UNKNOWN") != "FAR" and CS.out.cruiseState.enabled and \
|
||||
self.CP.carFingerprint not in UNSUPPORTED_DSU_CAR:
|
||||
if self.frame % 6 == 0 and self.CP.openpilotLongitudinalControl:
|
||||
desired_distance = 4 - hud_control.leadDistanceBars
|
||||
if CS.out.cruiseState.enabled and CS.pcm_follow_distance != desired_distance:
|
||||
self.distance_button = not self.distance_button
|
||||
else:
|
||||
self.distance_button = 0
|
||||
|
|
|
@ -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,6 +680,7 @@ class Controls:
|
|||
hudControl.speedVisible = self.enabled
|
||||
hudControl.lanesVisible = self.enabled
|
||||
hudControl.leadVisible = self.sm['longitudinalPlan'].hasLead
|
||||
hudControl.leadDistanceBars = self.sm['longitudinalPlan'].personality.raw + 1
|
||||
|
||||
hudControl.rightLaneVisible = True
|
||||
hudControl.leftLaneVisible = True
|
||||
|
|
|
@ -1 +1 @@
|
|||
d53d44c21a89d7925d5ad16938e14794907f28b1
|
||||
653f68e6be4689dc9dce1a93cb726d37b9c588d3
|
||||
|
|
Loading…
Reference in New Issue