Skip to content

Commit

Permalink
dont compensate when stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
cydia2020 committed Jan 25, 2024
1 parent f025b7c commit 983fc8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ((CS.out.vEgo < 1e-3 and actuators.accel < 1e-3) or stopping):
if (self.CP.carFingerprint in NO_STOP_TIMER_CAR and actuators.accel < 1e-3 or stopping) or CS.out.vEgo < 1e-3:
should_compensate = False
# pcm neutral force
if CC.longActive and should_compensate and not self.prohibit_neg_calculation:
Expand Down

0 comments on commit 983fc8f

Please sign in to comment.