mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Added drivetrain code
This commit is contained in:
parent
3dd19f8a53
commit
ade2ce7bfb
@ -2,6 +2,17 @@
|
||||
#include "../RobotMap.h"
|
||||
|
||||
Drivetrain::Drivetrain() : Subsystem("Drivetrain") {
|
||||
frontLeft=new Talon(0);
|
||||
frontRight=new Talon(1);
|
||||
backLeft=new Talon(2);
|
||||
backRight=new Talon(3);
|
||||
drive=new RobotDrive(frontLeft, frontRight, backLeft, backRight);
|
||||
}
|
||||
void Drivetrain::InitDefaultCommand() {
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
@ -5,8 +5,12 @@
|
||||
class Drivetrain: public Subsystem
|
||||
{
|
||||
private:
|
||||
Talon *frontLeft, *frontRight, *backLeft, *backRight;
|
||||
RobotDrive *drive;
|
||||
public:
|
||||
Drivetrain();
|
||||
void InitDefaultCommand();
|
||||
void DriveMecanum(float, float, float);
|
||||
void DriveArcade(float, float);
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user