[examples] Use PWMSparkMax instead of PWMVictorSPX (#3156)

This accurately reflects the motor controllers that are distributed in
the Kit of Parts.
This commit is contained in:
Prateek Machiraju
2021-02-13 01:14:56 -05:00
committed by GitHub
parent 69e8d0b65d
commit be0ce99007
89 changed files with 304 additions and 304 deletions

View File

@@ -6,7 +6,7 @@
#include <frc/AnalogGyro.h>
#include <frc/Encoder.h>
#include <frc/PWMVictorSPX.h>
#include <frc/PWMSparkMax.h>
#include <frc/SpeedControllerGroup.h>
#include <frc/controller/PIDController.h>
#include <frc/controller/SimpleMotorFeedforward.h>
@@ -68,10 +68,10 @@ class Drivetrain {
static constexpr double kWheelRadius = 0.0508; // meters
static constexpr int kEncoderResolution = 4096;
frc::PWMVictorSPX m_leftLeader{1};
frc::PWMVictorSPX m_leftFollower{2};
frc::PWMVictorSPX m_rightLeader{3};
frc::PWMVictorSPX m_rightFollower{4};
frc::PWMSparkMax m_leftLeader{1};
frc::PWMSparkMax m_leftFollower{2};
frc::PWMSparkMax m_rightLeader{3};
frc::PWMSparkMax m_rightFollower{4};
frc::SpeedControllerGroup m_leftGroup{m_leftLeader, m_leftFollower};
frc::SpeedControllerGroup m_rightGroup{m_rightLeader, m_rightFollower};