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

VW: check cruise control #32049

Merged
merged 5 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions selfdrive/car/volkswagen/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,15 @@ def update(self, pt_cp, cam_cp, ext_cp, trans_type):
# currently regulating speed (3), driver accel override (4), brake only (5)
ret.cruiseState.available = pt_cp.vl["TSK_06"]["TSK_Status"] in (2, 3, 4, 5)
ret.cruiseState.enabled = pt_cp.vl["TSK_06"]["TSK_Status"] in (3, 4, 5)
# Speed limiter mode; ECM faults if we command ACC while not pcmCruise
ret.cruiseState.nonAdaptive = bool(pt_cp.vl["TSK_06"]["TSK_Limiter_ausgewaehlt"])

if self.CP.pcmCruise:
# Cruise Control mode; check for distance UI setting from the radar.
# ECM does not manage this, so do not need to check for openpilot longitudinal
ret.cruiseState.nonAdaptive = ext_cp.vl["ACC_02"]["ACC_Gesetzte_Zeitluecke"] == 0
else:
# Speed limiter mode; ECM faults if we command ACC while not pcmCruise
ret.cruiseState.nonAdaptive = bool(pt_cp.vl["TSK_06"]["TSK_Limiter_ausgewaehlt"])

ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7)

self.esp_hold_confirmation = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"])
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 @@
f77699bfd783ab0c9a419f2af883b36aed20cc68
28001018eae89eb4906717bebf892345ad590b5a
Loading