Skip to content

Commit

Permalink
VW PQ: tweak carAPI signals
Browse files Browse the repository at this point in the history
  • Loading branch information
dkiiv committed Nov 7, 2024
1 parent bf2eaaf commit 6b126e8
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 @@ -159,7 +159,7 @@ def update(self, CC, CS, now_nanos):
starting = actuators.longControlState == LongCtrlState.pid and (CS.esp_hold_confirmation or CS.out.vEgo < self.CP.vEgoStopping)
accel = clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) if CC.longActive else 0
self.accel_diff = (0.0019 * (accel - self.accel_last)) + (1 - 0.0019) * self.accel_diff # 1000 SMA equivalence
self.long_deviation = interp(abs(accel - self.accel_diff), [0, .1, .2], [.13, .1, 0]) # floating comfort band calculation
self.long_deviation = interp(abs(accel - self.accel_diff), [0, .2, .3], [.13, .1, 0]) # floating comfort band calculation
self.long_ratelimit = (0.007 * (clip(abs(accel), 0.7, 3))) + (1 - 0.007) * self.long_ratelimit # set jerk/rate limit based on accel
self.accel_last = accel

Expand Down

0 comments on commit 6b126e8

Please sign in to comment.