Update examples to use VictorSPX's rather then Sparks (#1521)

This commit is contained in:
Thad House
2018-12-31 13:45:09 -08:00
committed by Peter Johnson
parent 3635116049
commit c12d7729e3
32 changed files with 96 additions and 95 deletions

View File

@@ -8,7 +8,7 @@
#pragma once
#include <frc/DigitalInput.h>
#include <frc/Spark.h>
#include <frc/PWMVictorSPX.h>
#include <frc/commands/Subsystem.h>
/**
@@ -46,6 +46,6 @@ class Claw : public frc::Subsystem {
void Log();
private:
frc::Spark m_motor{7};
frc::PWMVictorSPX m_motor{7};
frc::DigitalInput m_contact{5};
};

View File

@@ -10,7 +10,7 @@
#include <frc/AnalogGyro.h>
#include <frc/AnalogInput.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>
@@ -67,12 +67,12 @@ class DriveTrain : public frc::Subsystem {
double GetDistanceToObstacle();
private:
frc::Spark m_frontLeft{1};
frc::Spark m_rearLeft{2};
frc::PWMVictorSPX m_frontLeft{1};
frc::PWMVictorSPX m_rearLeft{2};
frc::SpeedControllerGroup m_left{m_frontLeft, m_rearLeft};
frc::Spark m_frontRight{3};
frc::Spark m_rearRight{4};
frc::PWMVictorSPX m_frontRight{3};
frc::PWMVictorSPX m_rearRight{4};
frc::SpeedControllerGroup m_right{m_frontRight, m_rearRight};
frc::DifferentialDrive m_robotDrive{m_left, m_right};

View File

@@ -8,7 +8,7 @@
#pragma once
#include <frc/AnalogPotentiometer.h>
#include <frc/Spark.h>
#include <frc/PWMVictorSPX.h>
#include <frc/commands/PIDSubsystem.h>
/**
@@ -42,7 +42,7 @@ class Elevator : public frc::PIDSubsystem {
void UsePIDOutput(double d) override;
private:
frc::Spark m_motor{5};
frc::PWMVictorSPX m_motor{5};
// Conversion value of potentiometer varies between the real world and
// simulation

View File

@@ -8,7 +8,7 @@
#pragma once
#include <frc/AnalogPotentiometer.h>
#include <frc/Spark.h>
#include <frc/PWMVictorSPX.h>
#include <frc/commands/PIDSubsystem.h>
/**
@@ -40,7 +40,7 @@ class Wrist : public frc::PIDSubsystem {
void UsePIDOutput(double d) override;
private:
frc::Spark m_motor{6};
frc::PWMVictorSPX m_motor{6};
// Conversion value of potentiometer varies between the real world and
// simulation