[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

@@ -3,7 +3,7 @@
// the WPILib BSD license file in the root directory of this project.
#include <frc/GenericHID.h>
#include <frc/PWMVictorSPX.h>
#include <frc/PWMSparkMax.h>
#include <frc/TimedRobot.h>
#include <frc/XboxController.h>
#include <frc/drive/DifferentialDrive.h>
@@ -13,8 +13,8 @@
* Runs the motors with tank steering and an Xbox controller.
*/
class Robot : public frc::TimedRobot {
frc::PWMVictorSPX m_leftMotor{0};
frc::PWMVictorSPX m_rightMotor{1};
frc::PWMSparkMax m_leftMotor{0};
frc::PWMSparkMax m_rightMotor{1};
frc::DifferentialDrive m_robotDrive{m_leftMotor, m_rightMotor};
frc::XboxController m_driverController{0};