Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

longitudinal personality: display in Toyota instrument cluster #31760

Merged
merged 27 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7b83134
start at param
sshane Mar 7, 2024
c7d1282
start by sending personality
sshane Mar 7, 2024
ef127aa
change to personality
sshane Mar 7, 2024
180b46b
POC: button changes personality
sshane Mar 7, 2024
1c0534d
what's wrong with this?
sshane Mar 7, 2024
e116f20
fix
sshane Mar 7, 2024
ef3d1dc
not really possible but fuzzy test catches this
sshane Mar 7, 2024
c905c23
there's always a typo
sshane Mar 7, 2024
c66c6fa
dang, we're dropping messages
sshane Mar 7, 2024
6af6057
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 7, 2024
b58dac3
clean up
sshane Mar 7, 2024
b36e3c0
no comment
sshane Mar 7, 2024
eb020e6
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 8, 2024
1835927
bump
sshane Mar 8, 2024
11dfeb0
rename
sshane Mar 8, 2024
f427e92
revert longplan
sshane Mar 8, 2024
b36b423
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 8, 2024
beda991
revert this
sshane Mar 8, 2024
1bed41d
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 8, 2024
180df00
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 8, 2024
a44edfa
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 9, 2024
b1f11f6
Merge remote-tracking branch 'upstream/master' into disp-personality
sshane Mar 9, 2024
ca6d324
Fix check
sshane Mar 9, 2024
593d5c9
more appropriate up here
sshane Mar 9, 2024
f2eb3ec
consistenet
sshane Mar 9, 2024
d4ad7c3
Update selfdrive/car/toyota/carstate.py
sshane Mar 9, 2024
961fdc3
Update ref_commit
sshane Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions selfdrive/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def update(self, CC, CS, now_nanos):
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
Expand Down
1 change: 0 additions & 1 deletion selfdrive/car/toyota/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def __init__(self, CP):
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
Expand Down
1 change: 1 addition & 0 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ def publish_logs(self, CS, start_time, CC, lac_log):
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
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d53d44c21a89d7925d5ad16938e14794907f28b1
653f68e6be4689dc9dce1a93cb726d37b9c588d3
Loading