[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/controller/PIDController.h>
#include <frc/controller/SimpleMotorFeedforward.h>
#include <frc/estimator/MecanumDrivePoseEstimator.h>
@@ -35,10 +35,10 @@ class Drivetrain {
wpi::math::pi}; // 1/2 rotation per second
private:
frc::PWMVictorSPX m_frontLeftMotor{1};
frc::PWMVictorSPX m_frontRightMotor{2};
frc::PWMVictorSPX m_backLeftMotor{3};
frc::PWMVictorSPX m_backRightMotor{4};
frc::PWMSparkMax m_frontLeftMotor{1};
frc::PWMSparkMax m_frontRightMotor{2};
frc::PWMSparkMax m_backLeftMotor{3};
frc::PWMSparkMax m_backRightMotor{4};
frc::Encoder m_frontLeftEncoder{0, 1};
frc::Encoder m_frontRightEncoder{2, 3};