mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
22 lines
543 B
C++
22 lines
543 B
C++
#include "RollIn.h"
|
|
RollIn::RollIn() : Command("RollIn"){
|
|
}
|
|
void RollIn::Initialize(){
|
|
printf("Initialized RollIn\n");
|
|
SetTimeout(2.0);
|
|
}
|
|
void RollIn::Execute(){
|
|
//TODO check this value to move the motors in the right direction
|
|
DentRobot::collector->MoveRollers(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
|
|
}
|
|
bool RollIn::IsFinished(){
|
|
return DentRobot::collector->BoxCollected()||IsTimedOut();
|
|
}
|
|
void RollIn::End(){
|
|
DentRobot::collector->MoveRollers(0.0);
|
|
}
|
|
void RollIn::Interrupted(){
|
|
End();
|
|
}
|
|
// vim: ts=2:sw=2:et
|