[wpilibc] Fix Mecanum & Swerve ControllerCommand lambda capture (#3795)

Fixes #3765
Also fixes SwerveControllerCommand example calling command twice.
This commit is contained in:
sciencewhiz
2021-12-18 11:30:57 -08:00
committed by GitHub
parent c5ae0effac
commit d41d051f1b
3 changed files with 7 additions and 19 deletions

View File

@@ -86,7 +86,7 @@ frc2::Command* RobotContainer::GetAutonomousCommand() {
// no auto
return new frc2::SequentialCommandGroup(
std::move(swerveControllerCommand), std::move(swerveControllerCommand),
std::move(swerveControllerCommand),
frc2::InstantCommand(
[this]() {
m_drive.Drive(units::meters_per_second_t(0),