diff --git a/selfdrive/car/volkswagen/carcontroller.py b/selfdrive/car/volkswagen/carcontroller.py index 0c5b36753d6e41..c5cea281d155c8 100644 --- a/selfdrive/car/volkswagen/carcontroller.py +++ b/selfdrive/car/volkswagen/carcontroller.py @@ -158,13 +158,12 @@ def update(self, CC, CS, now_nanos): if self.CCS == pqcan and CC.longActive and actuators.accel <= 0 and CS.out.vEgoRaw <= 6: accel = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) self.AWV_enable = 1 - self.AWV_brake = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) + self.AWV_brake = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) * (max(0, CS.out.vEgo / 1.5) if CS.out.vEgoRaw <= 1.5 else 1) else: accel = clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) if CC.longActive else 0 self.AWV_enable = 0 if CS.out.vEgoRaw >= 6 else self.AWV_enable self.AWV_brake = 0 self.AWV_halten = 1 if CS.out.vEgoRaw <= 3 and self.AWV_enable else 0 - self.AWV_brake *= max(0, CS.out.vEgo / 1.5) if CS.out.vEgoRaw <= 1.5 else 1 self.long_deviation = 0 # TODO: make dynamic again self.long_ratelimit = 4 # TODO: make dynamic again