make sure accel_last changes with raw if in pid

This commit is contained in:
Jason Wen
2024-07-22 16:56:48 -04:00
parent e64d209f54
commit 8affb2fcad
+2 -1
View File
@@ -535,7 +535,8 @@ class CarController(CarControllerBase):
def make_accel(self, accel, actuators):
if actuators.longControlState == LongCtrlState.pid:
rate_up, rate_down = 0.1, 0.1
rate_up, rate_down = 0.0, 0.0
self.accel_last = accel
else:
rate_up = 0.02 * self.jerk_u
rate_down = 0.02 * self.jerk_l