Skip to content

Commit

Permalink
Toyota: fix future aEgo calculation (#1562)
Browse files Browse the repository at this point in the history
Update carcontroller.py
  • Loading branch information
sshane authored Dec 7, 2024
1 parent a0b0b06 commit cc30feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opendbc/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cc30feb

Please sign in to comment.