From 6f91f37cd0082e12b1109607481ce9a339f6c7d8 Mon Sep 17 00:00:00 2001 From: WarrenReynolds <86037820+WarrenReynolds@users.noreply.github.com> Date: Thu, 23 Dec 2021 07:26:02 +1100 Subject: [PATCH] [examples] Fix SwerveControllerCommand order of Module States (#3815) DriveSubsystem::SetModulesStates applies module state to incorrect modules. Fixes #3814. --- .../SwerveControllerCommand/cpp/subsystems/DriveSubsystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/cpp/subsystems/DriveSubsystem.cpp b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/cpp/subsystems/DriveSubsystem.cpp index 7ef4af3241..60f619e2d6 100644 --- a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/cpp/subsystems/DriveSubsystem.cpp +++ b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/cpp/subsystems/DriveSubsystem.cpp @@ -69,8 +69,8 @@ void DriveSubsystem::SetModuleStates( kDriveKinematics.NormalizeWheelSpeeds(&desiredStates, AutoConstants::kMaxSpeed); m_frontLeft.SetDesiredState(desiredStates[0]); - m_rearLeft.SetDesiredState(desiredStates[1]); - m_frontRight.SetDesiredState(desiredStates[2]); + m_frontRight.SetDesiredState(desiredStates[1]); + m_rearLeft.SetDesiredState(desiredStates[2]); m_rearRight.SetDesiredState(desiredStates[3]); }