2
0
mirror of https://github.com/team2059/Dent synced 2025-01-07 22:14:14 -05:00
dent/Commands/BinElevator/BinLower.cpp
2015-09-19 21:57:42 +00:00

26 lines
636 B
C++

#include "BinLower.h"
#include "../../DentRobot.h"
#include "../../OI.h"
BinLower::BinLower(float timeout): Command("BinLower") {
SetTimeout(timeout);
}
void BinLower::Initialize() {}
void BinLower::Execute() {
DentRobot::binElevator->Run(-1.0);
}
bool BinLower::IsFinished() {
if(/*!DentRobot::binElevator->GetElevatorBottom()||*/IsTimedOut()) {
printf("Robot stoped BinLowering. Sensor based? %d\n", !DentRobot::binElevator->GetElevatorBottom());
return true;
} else {
return false;
}
}
void BinLower::End() {
DentRobot::binElevator->Run(0.0f);
}
void BinLower::Interrupted() {
End();
}
// vim: ts=2:sw=2:et