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