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

23 lines
613 B
C++

#include "RollOut.h"
RollOut::RollOut(double timeout): Command("RollOut") {
Requires(DentRobot::collector);
SetTimeout(timeout);
}
void RollOut::Initialize() {
}
void RollOut::Execute() {
// Divide by 2 twice because this speed should be half the collector speed
DentRobot::collector->MoveRollers(-DentRobot::oi->GetLeftThrottle() * 0.8);
SmartDashboard::PutNumber("DriveThrottle", -DentRobot::oi->GetLeftThrottle());
}
bool RollOut::IsFinished() {
return IsTimedOut();
}
void RollOut::End() {
DentRobot::collector->MoveRollers(0.0f);
}
void RollOut::Interrupted() {
End();
}
// vim: ts=2:sw=2:et