mirror of
https://github.com/team2059/Dent
synced 2025-01-07 22:14:14 -05:00
26 lines
519 B
C++
26 lines
519 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->MoveArms(-0.1);
|
|
}
|
|
bool BinOut::IsFinished() {
|
|
if(IsTimedOut()) {
|
|
printf("Robot stopped ejecting bin.\n");
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
void BinOut::End() {
|
|
DentRobot::binCollector->MoveArms(0.0);
|
|
}
|
|
void BinOut::Interrupted() {
|
|
End();
|
|
}
|
|
// vim: ts=2:sw=2:et
|