2
0
mirror of https://github.com/team2059/Dent synced 2025-01-07 22:14:14 -05:00

it kinda works sorta maybe

This commit is contained in:
Adam Long 2015-01-18 14:03:41 +00:00
parent 300dfaafc9
commit f336874a29
4 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#include "Drive.h" #include "Drive.h"
#include "../DentRobot.h" #include "../DentRobot.h"
Drive::Drive() : Command("Drive"){ Drive::Drive() : Command("Drive"){
Requires(DentRobot::drivetrain);
} }
void Drive::Initialize(){ void Drive::Initialize(){
} }

View File

@ -1,6 +1,8 @@
#ifndef DRIVE_H #ifndef DRIVE_H
#define DRIVE_H #define DRIVE_H
#include "../CommandBase.h"
#include "../DentRobot.h"
#include "Commands/Command.h" #include "Commands/Command.h"
#include "WPILib.h" #include "WPILib.h"

View File

@ -3,10 +3,10 @@
#include "../Commands/Drive.h" #include "../Commands/Drive.h"
Drivetrain::Drivetrain() : Subsystem("Drivetrain"){ Drivetrain::Drivetrain() : Subsystem("Drivetrain"){
frontLeft=new Talon(0); frontLeft=new CANTalon(40);
frontRight=new Talon(1); frontRight=new CANTalon(41);
backLeft=new Talon(2); backLeft=new CANTalon(42);
backRight=new Talon(3); backRight=new CANTalon(43);
drive=new RobotDrive(frontLeft, frontRight, backLeft, backRight); drive=new RobotDrive(frontLeft, frontRight, backLeft, backRight);
} }
void Drivetrain::InitDefaultCommand(){ void Drivetrain::InitDefaultCommand(){

View File

@ -5,7 +5,7 @@
class Drivetrain: public Subsystem class Drivetrain: public Subsystem
{ {
private: private:
Talon *frontLeft, *frontRight, *backLeft, *backRight; CANTalon *frontLeft, *frontRight, *backLeft, *backRight;
RobotDrive *drive; RobotDrive *drive;
public: public:
Drivetrain(); Drivetrain();