mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
24 lines
547 B
C++
24 lines
547 B
C++
#include "Turn.h"
|
|
#include "../../DentRobot.h"
|
|
Turn::Turn(double timeout): Command("Turn") {
|
|
Requires(DentRobot::drivetrain);
|
|
SetTimeout(timeout);
|
|
}
|
|
void Turn::Initialize() {
|
|
}
|
|
void Turn::Execute() {
|
|
//X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle)
|
|
DentRobot::drivetrain->DriveArcade(0.0, 0.0, 0.6, 0.9);
|
|
}
|
|
bool Turn::IsFinished() {
|
|
return IsTimedOut();
|
|
}
|
|
void Turn::End() {
|
|
// Stop driving
|
|
DentRobot::drivetrain->DriveArcade(0.0, 0.0, 0.0, 0.9);
|
|
}
|
|
void Turn::Interrupted() {
|
|
End();
|
|
}
|
|
// vim: ts=2:sw=2:et
|