2015-01-16 19:29:55 -05:00
|
|
|
#include "Drivetrain.h"
|
|
|
|
#include "../RobotMap.h"
|
|
|
|
|
|
|
|
Drivetrain::Drivetrain() : Subsystem("Drivetrain") {
|
2015-01-17 10:34:08 -05:00
|
|
|
frontLeft=new Talon(0);
|
|
|
|
frontRight=new Talon(1);
|
|
|
|
backLeft=new Talon(2);
|
|
|
|
backRight=new Talon(3);
|
|
|
|
drive=new RobotDrive(frontLeft, frontRight, backLeft, backRight);
|
2015-01-16 19:29:55 -05:00
|
|
|
}
|
|
|
|
void Drivetrain::InitDefaultCommand() {
|
|
|
|
}
|
2015-01-17 10:34:08 -05:00
|
|
|
void Drivetrain::DriveMecanum(float x, float y, float rotation){
|
|
|
|
drive->MecanumDrive_Cartesian(x, y, rotation);
|
|
|
|
}
|
|
|
|
void Drivetrain::DriveArcade(float x, float y){
|
|
|
|
drive->ArcadeDrive(x, y);
|
|
|
|
}
|