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

28 lines
769 B
C++
Raw Normal View History

#include "CloseCollector.h"
CloseCollector::CloseCollector() : Command("CloseCollector"){
}
void CloseCollector::Initialize(){
printf("Initialized collector: 0.5\n");
SetTimeout(.5);
}
void CloseCollector::Execute(){
//printf("Closing collector: -0.5f\n");
DentRobot::collector->MoveArms(-0.5);
//DentRobot::collector->MoveArms(-(-DentRobot::oi->GetRightStick()->GetRawAxis(3)+1)/2*.3/.5);
}
bool CloseCollector::IsFinished(){
if(DentRobot::collector->ArmSensor()||IsTimedOut()){
printf("Stopped Closing: %d, %d\n",DentRobot::collector->ArmSensor(), IsTimedOut());
return true;
}else{
return false;
}
}
void CloseCollector::End(){
DentRobot::collector->MoveArms(0.0f);
}
void CloseCollector::Interrupted(){
2015-02-02 20:08:04 -05:00
End();
}
2015-02-08 12:26:15 -05:00
// vim: ts=2:sw=2:et