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

26 lines
511 B
C++
Raw Normal View History

#include "BinIn.h"
#include "../../DentRobot.h"
#include "../../OI.h"
2015-07-31 12:52:15 -04:00
BinIn::BinIn(float timeout): Command("BinIn") {
SetTimeout(timeout);
}
2015-09-19 17:57:42 -04:00
void BinIn::Initialize() {}
2015-07-31 12:52:15 -04:00
void BinIn::Execute() {
DentRobot::binCollector->MoveArms(0.75);
}
2015-07-31 12:52:15 -04:00
bool BinIn::IsFinished() {
if(IsTimedOut()) {
printf("Robot stopped collecting bin.\n");
return true;
2015-07-31 12:52:15 -04:00
} else {
return false;
}
}
2015-07-31 12:52:15 -04:00
void BinIn::End() {
DentRobot::binCollector->MoveArms(0.0);
}
2015-07-31 12:52:15 -04:00
void BinIn::Interrupted() {
End();
}
// vim: ts=2:sw=2:et