Skip to content
Merged
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
10 changes: 6 additions & 4 deletions selfdrive/car/volkswagen/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ def update(self, pt_cp, cam_cp, ext_cp, trans_type):
ret.cruiseState.standstill = self.CP.pcmCruise and self.esp_hold_confirmation

# Update ACC setpoint. When the setpoint is zero or there's an error, the
# radar sends a set-speed of ~90.69 m/s / 203mph.
# TODO: ugly hack while testing CC-only S4
if self.CP.pcmCruise and not self.CP.flags & VolkswagenFlags.MLB:
# radar sends a set-speed of ~90.69 m/s / 203.19 mph / 327.04 kph
# TODO: ugly hack while testing CC-only S4, also macan.
# EDIT: bumping the upper limit to 100 to match the stock functionality (100 max CC set point on USA Macan)
if self.CP.pcmCruise:
ret.cruiseState.speed = ext_cp.vl["ACC_02"]["ACC_Wunschgeschw_02"] * CV.KPH_TO_MS
if ret.cruiseState.speed > 90:
if ret.cruiseState.speed > 100:
ret.cruiseState.speed = 0

# Update button states for turn signals and ACC controls, capture all ACC button state/config for passthrough
Expand Down Expand Up @@ -380,6 +381,7 @@ def get_can_parser_mlb(CP):
("Blinkmodi_01", 0), # From J519 BCM (sent at 1Hz when no lights active, 50Hz when active)
("Kombi_03", 0), # From J285 instrument cluster (not present on older cars, 1Hz when present)
("Getriebe_03", 50), # TODO: what is the source of this signal? transmission ecu?
("ACC_02", 25), # Macan test: CC speed setting
]

# TODO: gear shift parsing
Expand Down
Loading