From cc30feb6fbb86b0601a1838f0325f389e78c423d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sat, 7 Dec 2024 04:53:46 -0600 Subject: [PATCH] Toyota: fix future aEgo calculation (#1562) Update carcontroller.py --- opendbc/car/toyota/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index 403b31cc97..4dc42a1074 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -226,7 +226,7 @@ def update(self, CC, CS, now_nanos): # wind down integral when approaching target for step changes and smooth ramps to reduce overshoot prev_aego = self.aego.x self.aego.update(a_ego_blended) - j_ego = (self.aego.x - prev_aego) / DT_CTRL + j_ego = (self.aego.x - prev_aego) / (DT_CTRL * 3) a_ego_future = a_ego_blended + j_ego * 0.5 if actuators.longControlState == LongCtrlState.pid: