[examples] Fix Swerve and Mecanum examples (#3359)

Fix encoder allocation and default command.
Fixes #3349
This commit is contained in:
sciencewhiz
2021-05-15 21:39:00 -07:00
committed by GitHub
parent 80b479e502
commit 1873fbefba
12 changed files with 61 additions and 35 deletions

View File

@@ -36,8 +36,8 @@ class SwerveModule {
frc::PWMSparkMax m_driveMotor;
frc::PWMSparkMax m_turningMotor;
frc::Encoder m_driveEncoder{0, 1};
frc::Encoder m_turningEncoder{2, 3};
frc::Encoder m_driveEncoder;
frc::Encoder m_turningEncoder;
frc2::PIDController m_drivePIDController{1.0, 0, 0};
frc::ProfiledPIDController<units::radians> m_turningPIDController{