From f336874a29fab21dcb5d52e5419ce4a479a5a931 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Sun, 18 Jan 2015 14:03:41 +0000 Subject: [PATCH] it kinda works sorta maybe --- src/Commands/Drive.cpp | 1 + src/Commands/Drive.h | 2 ++ src/Subsystems/Drivetrain.cpp | 8 ++++---- src/Subsystems/Drivetrain.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Commands/Drive.cpp b/src/Commands/Drive.cpp index 05ad2d1..3320949 100644 --- a/src/Commands/Drive.cpp +++ b/src/Commands/Drive.cpp @@ -1,6 +1,7 @@ #include "Drive.h" #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();