mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Update examples to use VictorSPX's rather then Sparks (#1521)
This commit is contained in:
committed by
Peter Johnson
parent
3635116049
commit
c12d7729e3
@@ -8,8 +8,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <frc/DigitalInput.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/Solenoid.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/commands/Subsystem.h>
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ class Collector : public frc::Subsystem {
|
||||
|
||||
private:
|
||||
// Subsystem devices
|
||||
frc::Spark m_rollerMotor{6};
|
||||
frc::PWMVictorSPX m_rollerMotor{6};
|
||||
frc::DigitalInput m_ballDetector{10};
|
||||
frc::Solenoid m_piston{1};
|
||||
frc::DigitalInput m_openDetector{6};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <frc/AnalogGyro.h>
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/SpeedControllerGroup.h>
|
||||
#include <frc/commands/Subsystem.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
@@ -63,12 +63,12 @@ class DriveTrain : public frc::Subsystem {
|
||||
|
||||
private:
|
||||
// Subsystem devices
|
||||
frc::Spark m_frontLeftCIM{1};
|
||||
frc::Spark m_rearLeftCIM{2};
|
||||
frc::PWMVictorSPX m_frontLeftCIM{1};
|
||||
frc::PWMVictorSPX m_rearLeftCIM{2};
|
||||
frc::SpeedControllerGroup m_leftCIMs{m_frontLeftCIM, m_rearLeftCIM};
|
||||
|
||||
frc::Spark m_frontRightCIM{3};
|
||||
frc::Spark m_rearRightCIM{4};
|
||||
frc::PWMVictorSPX m_frontRightCIM{3};
|
||||
frc::PWMVictorSPX m_rearRightCIM{4};
|
||||
frc::SpeedControllerGroup m_rightCIMs{m_frontRightCIM, m_rearRightCIM};
|
||||
|
||||
frc::DifferentialDrive m_robotDrive{m_leftCIMs, m_rightCIMs};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <frc/AnalogPotentiometer.h>
|
||||
#include <frc/DigitalInput.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/commands/PIDSubsystem.h>
|
||||
|
||||
/**
|
||||
@@ -70,5 +70,5 @@ class Pivot : public frc::PIDSubsystem {
|
||||
frc::AnalogPotentiometer m_pot{1};
|
||||
|
||||
// Motor to move the pivot
|
||||
frc::Spark m_motor{5};
|
||||
frc::PWMVictorSPX m_motor{5};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user