diff --git a/src/Commands/Drive.cpp b/src/Commands/Drive.cpp index f8f5a0f..fd136b0 100644 --- a/src/Commands/Drive.cpp +++ b/src/Commands/Drive.cpp @@ -2,6 +2,7 @@ #include #include "../DentRobot.h" Drive::Drive() : Command("Drive"){ + Requires(DentRobot::drivetrain); } void Drive::Initialize(){ } diff --git a/src/Commands/Drive.h b/src/Commands/Drive.h index 8254d17..258cbc1 100644 --- a/src/Commands/Drive.h +++ b/src/Commands/Drive.h @@ -1,6 +1,8 @@ #ifndef DRIVE_H #define DRIVE_H +#include "../CommandBase.h" +#include "../DentRobot.h" #include "Commands/Command.h" #include "WPILib.h" diff --git a/src/Subsystems/Drivetrain.cpp b/src/Subsystems/Drivetrain.cpp index be9878c..cfbf5bf 100644 --- a/src/Subsystems/Drivetrain.cpp +++ b/src/Subsystems/Drivetrain.cpp @@ -3,10 +3,10 @@ #include "../Commands/Drive.h" Drivetrain::Drivetrain() : Subsystem("Drivetrain"){ - frontLeft=new Talon(0); - frontRight=new Talon(1); - backLeft=new Talon(2); - backRight=new Talon(3); + frontLeft=new CANTalon(40); + frontRight=new CANTalon(41); + backLeft=new CANTalon(42); + backRight=new CANTalon(43); drive=new RobotDrive(frontLeft, frontRight, backLeft, backRight); } void Drivetrain::InitDefaultCommand(){ diff --git a/src/Subsystems/Drivetrain.h b/src/Subsystems/Drivetrain.h index 84274b1..d4b1a6c 100644 --- a/src/Subsystems/Drivetrain.h +++ b/src/Subsystems/Drivetrain.h @@ -5,7 +5,7 @@ class Drivetrain: public Subsystem { private: - Talon *frontLeft, *frontRight, *backLeft, *backRight; + CANTalon *frontLeft, *frontRight, *backLeft, *backRight; RobotDrive *drive; public: Drivetrain();