From ac2d0ed35d7b38848b13a67af5809952bc3bc3e1 Mon Sep 17 00:00:00 2001 From: actuallylemoncurd Date: Fri, 1 Nov 2024 18:35:02 -0400 Subject: [PATCH] VW PQ: update AWV brake ramp --- selfdrive/car/volkswagen/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/volkswagen/carcontroller.py b/selfdrive/car/volkswagen/carcontroller.py index c5cea281d155c8..56fa747b3041dd 100644 --- a/selfdrive/car/volkswagen/carcontroller.py +++ b/selfdrive/car/volkswagen/carcontroller.py @@ -158,7 +158,7 @@ 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) * (max(0, CS.out.vEgo / 1.5) if CS.out.vEgoRaw <= 1.5 else 1) + self.AWV_brake = clip(actuators.accel, self.CCP.ACCEL_MIN, 0) * (max(0, (CS.out.vEgo - 0.14) / 3) if self.AWV_halten 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