mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Reorder TrapezoidProfile.calculate() arguments (#5874)
ProfiledPIDController and ExponentialProfile use current, then goal. This isn't a breaking change because this overload of calculate() is new for 2024.
This commit is contained in:
@@ -322,7 +322,7 @@ class ProfiledPIDController
|
||||
m_setpoint.position = setpointMinDistance + measurement;
|
||||
}
|
||||
|
||||
m_setpoint = m_profile.Calculate(GetPeriod(), m_goal, m_setpoint);
|
||||
m_setpoint = m_profile.Calculate(GetPeriod(), m_setpoint, m_goal);
|
||||
return m_controller.Calculate(measurement.value(),
|
||||
m_setpoint.position.value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user