2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00
dent/Commands/Autonomous/Turn.cpp

25 lines
593 B
C++
Raw Normal View History

#include "Turn.h"
#include "../../DentRobot.h"
// Drive for a short while then stop. Just for testing
2015-02-21 08:43:19 -05:00
Turn::Turn(int k) : Command("Turn"){
Requires(DentRobot::drivetrain);
SetTimeout(k);
}
void Turn::Initialize(){
}
void Turn::Execute(){
//X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle), gyro
DentRobot::drivetrain->DriveMecanum(0.0,0.0,0.65,0.9,0.0);
}
bool Turn::IsFinished(){
return IsTimedOut();
}
void Turn::End(){
// Stop driving
DentRobot::drivetrain->DriveMecanum(0.0,0.0,0.0,0.9,0.0);
}
void Turn::Interrupted(){
End();
}
// vim: ts=2:sw=2:et