Skip to content

Commit

Permalink
VW PQ: drop AendGrad a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dkiiv committed Nov 10, 2024
1 parent 1bf2306 commit a2948f4
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):
# SMA to EMA conversion: alpha = 2 / (n + 1) n = SMA-sample
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, .2, .3], [.2, .15, 0]) # floating comfort band calculation
self.long_jerklimit = (0.007 * (clip(abs(accel), 0.7, 3))) + (1 - 0.007) * self.long_jerklimit # set jerk limit based on accel
self.long_jerklimit = (0.007 * (clip(abs(accel), 0.7, 2))) + (1 - 0.007) * self.long_jerklimit # set jerk limit based on accel

if self.CCS == pqcan and CC.longActive and actuators.accel <= 0 and CS.out.vEgoRaw <= 5:
if not self.EPB_enable:
Expand Down

0 comments on commit a2948f4

Please sign in to comment.