mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
27 lines
471 B
C++
27 lines
471 B
C++
|
#include "BinOut.h"
|
||
|
#include "../../DentRobot.h"
|
||
|
#include "../../OI.h"
|
||
|
BinOut::BinOut(double timeout): Command("BinOut"){
|
||
|
SetTimeout(timeout);
|
||
|
}
|
||
|
void BinOut::Initialize(){
|
||
|
}
|
||
|
void BinOut::Execute(){
|
||
|
DentRobot::binCollector->Set(0.1);
|
||
|
End();
|
||
|
}
|
||
|
bool BinOut::IsFinished(){
|
||
|
if(IsTimedOut()){
|
||
|
printf("Robot stoped ejecting bin.\n");
|
||
|
return true;
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
void BinOut::End(){
|
||
|
}
|
||
|
void BinOut::Interrupted(){
|
||
|
End();
|
||
|
}
|
||
|
// vim: ts=2:sw=2:et
|