mirror of
https://github.com/team2059/Dent
synced 2025-01-17 22:19:21 -05:00
24 lines
526 B
C++
24 lines
526 B
C++
#include "Drive.h"
|
|
#include "../../DentRobot.h"
|
|
Drive::Drive(): Command("Drive"){
|
|
Requires(DentRobot::drivetrain);
|
|
}
|
|
void Drive::Initialize(){
|
|
}
|
|
void Drive::Execute(){
|
|
double x, y, z;
|
|
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
|
|
y = -DentRobot::oi->GetLeftStick()->GetRawAxis(1);
|
|
z = DentRobot::oi->GetLeftStick()->GetRawAxis(2);
|
|
DentRobot::drivetrain->DriveMecanum(x, y, z);
|
|
}
|
|
bool Drive::IsFinished(){
|
|
return IsTimedOut();
|
|
}
|
|
void Drive::End(){
|
|
}
|
|
void Drive::Interrupted(){
|
|
End();
|
|
}
|
|
// vim: ts=2:sw=2:et
|