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

Minor collector improvements

This commit is contained in:
Austen Adler 2015-02-14 16:16:03 -05:00
parent c8acfae930
commit 5aab16c8b1
5 changed files with 5 additions and 15 deletions

View File

@ -10,7 +10,7 @@ void RollIn::Execute(){
DentRobot::collector->MoveRollers(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
}
bool RollIn::IsFinished(){
return DentRobot::collector->BoxCollected()||IsTimedOut();
return IsTimedOut();
}
void RollIn::End(){
DentRobot::collector->MoveRollers(0.0);

View File

@ -11,7 +11,7 @@ void RollOut::Execute(){
DentRobot::collector->MoveRollers((-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2/2);
}
bool RollOut::IsFinished(){
return DentRobot::collector->BoxCollected();
return IsTimedOut();
}
void RollOut::End(){
DentRobot::collector->MoveRollers(0.0f);

View File

@ -21,7 +21,7 @@ void Drive::Execute(){
DentRobot::drivetrain->DriveMecanum(x,y,z,0.9,0);
}
bool Drive::IsFinished(){
return false;
return IsTimedOut();
}
void Drive::End(){
}

View File

@ -1,24 +1,16 @@
#include "Collector.h"
#include "../RobotMap.h"
Collector::Collector() : Subsystem("Collector") {
Collector::Collector() : Subsystem("Collector"){
collectorMotorLeft=new CANTalon(COLLECTOR_LEFT_CAN);
collectorMotorBottom=new CANTalon(COLLECTOR_BOTTOM_CAN);
collectorMotorRight=new CANTalon(COLLECTOR_RIGHT_CAN);
}
void Collector::InitDefaultCommand() {
void Collector::InitDefaultCommand(){
}
void Collector::MoveRollers(double a){
collectorMotorLeft->Set(a);
collectorMotorBottom->Set(a);
collectorMotorRight->Set(-a);
}
bool Collector::ArmSensor(){
// TODO: include limit switch code
return false;
}
bool Collector::BoxCollected(){
return false;
//return boxSwitch->Get();
}
// vim: ts=2:sw=2:et

View File

@ -10,8 +10,6 @@ class Collector: public Subsystem
Collector();
void InitDefaultCommand();
void MoveRollers(double);
bool ArmSensor();
bool BoxCollected();
};
#endif
// vim: ts=2:sw=2:et