Skip to content

Commit 6cc7e52

Browse files
authored
[commands] TrapezoidProfileSubsystem: Fix incorrect ordering of parameters (wpilibsuite#6338)
1 parent d4533a8 commit 6cc7e52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileSubsystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public TrapezoidProfileSubsystem(TrapezoidProfile.Constraints constraints) {
6363

6464
@Override
6565
public void periodic() {
66-
m_state = m_profile.calculate(m_period, m_goal, m_state);
66+
m_state = m_profile.calculate(m_period, m_state, m_goal);
6767
if (m_enabled) {
6868
useState(m_state);
6969
}

wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileSubsystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class TrapezoidProfileSubsystem : public SubsystemBase {
4545
m_period(period) {}
4646

4747
void Periodic() override {
48-
m_state = m_profile.Calculate(m_period, m_goal, m_state);
48+
m_state = m_profile.Calculate(m_period, m_state, m_goal);
4949
if (m_enabled) {
5050
UseState(m_state);
5151
}

0 commit comments

Comments
 (0)