2015-04-06 20:36:35 -04:00
|
|
|
#include "BinIn.h"
|
|
|
|
#include "../../DentRobot.h"
|
|
|
|
#include "../../OI.h"
|
|
|
|
BinIn::BinIn(float timeout): Command("BinIn"){
|
|
|
|
SetTimeout(timeout);
|
|
|
|
}
|
|
|
|
void BinIn::Initialize(){
|
|
|
|
}
|
|
|
|
void BinIn::Execute(){
|
2015-04-18 05:03:06 -04:00
|
|
|
DentRobot::binCollector->MoveArms(0.75);
|
2015-04-06 20:36:35 -04:00
|
|
|
}
|
|
|
|
bool BinIn::IsFinished(){
|
|
|
|
if(IsTimedOut()){
|
2015-04-18 05:03:06 -04:00
|
|
|
printf("Robot stopped collecting bin.\n");
|
2015-04-06 20:36:35 -04:00
|
|
|
return true;
|
|
|
|
}else{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void BinIn::End(){
|
2015-04-18 05:03:06 -04:00
|
|
|
DentRobot::binCollector->MoveArms(0.0);
|
2015-04-06 20:36:35 -04:00
|
|
|
}
|
|
|
|
void BinIn::Interrupted(){
|
|
|
|
End();
|
|
|
|
}
|
|
|
|
// vim: ts=2:sw=2:et
|