Skip to content

Commit

Permalink
VW PQ: allow ACC decel while waiting for AWV to engage
Browse files Browse the repository at this point in the history
  • Loading branch information
dkiiv committed Oct 31, 2024
1 parent f36b068 commit f5b9f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/car/volkswagen/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def update(self, CC, CS, now_nanos):
stopping = actuators.longControlState == LongCtrlState.stopping
starting = actuators.longControlState == LongCtrlState.pid and (CS.esp_hold_confirmation or CS.out.vEgo < self.CP.vEgoStopping)
if self.CCS == pqcan and CC.longActive and (clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) <= 0) and CS.out.vEgoRaw <= 6:
accel = 0
accel = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) if self.AWV_counter <= 10 else 0
self.AWV_enable = 1
self.AWV_brake = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) if self.AWV_counter >= 11 else 0
self.AWV_counter += 1
Expand Down

0 comments on commit f5b9f70

Please sign in to comment.