From f5f6a06913bd57afbc751730780a6491fa31fbaf Mon Sep 17 00:00:00 2001 From: Irene <12470297+cydia2020@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:44:53 +1100 Subject: [PATCH] Revert "dont compensate when stopped" This reverts commit 983fc8f34908dd530543415acc4abc960ade82ef. --- selfdrive/car/toyota/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 7667ae496a7f83..7ec5dfcd38f565 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -81,7 +81,7 @@ def update(self, CC, CS): self.prohibit_neg_calculation = False # NO_STOP_TIMER_CAR will creep if compensation is applied when stopping or stopped, don't compensate when stopped or stopping should_compensate = True - if (self.CP.carFingerprint in NO_STOP_TIMER_CAR and actuators.accel < 1e-3 or stopping) or CS.out.vEgo < 1e-3: + if self.CP.carFingerprint in NO_STOP_TIMER_CAR and ((CS.out.vEgo < 1e-3 and actuators.accel < 1e-3) or stopping): should_compensate = False # pcm neutral force if CC.longActive and should_compensate and not self.prohibit_neg_calculation: