[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:
Tyler Veness
2023-11-04 16:28:55 -07:00
committed by GitHub
parent 04a781b4d7
commit 201a42a3cd
15 changed files with 45 additions and 45 deletions

View File

@@ -79,7 +79,7 @@ public class TrapezoidProfileCommand extends Command {
@SuppressWarnings("removal")
public void execute() {
if (m_newAPI) {
m_output.accept(m_profile.calculate(m_timer.get(), m_goal.get(), m_currentState.get()));
m_output.accept(m_profile.calculate(m_timer.get(), m_currentState.get(), m_goal.get()));
} else {
m_output.accept(m_profile.calculate(m_timer.get()));
}

View File

@@ -79,7 +79,7 @@ class TrapezoidProfileCommand
void Initialize() override { m_timer.Restart(); }
void Execute() override {
m_output(m_profile.Calculate(m_timer.Get(), m_goal(), m_currentState()));
m_output(m_profile.Calculate(m_timer.Get(), m_currentState(), m_goal()));
}
void End(bool interrupted) override { m_timer.Stop(); }