mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Minor collector improvements
This commit is contained in:
parent
c8acfae930
commit
5aab16c8b1
@ -10,7 +10,7 @@ void RollIn::Execute(){
|
|||||||
DentRobot::collector->MoveRollers(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
|
DentRobot::collector->MoveRollers(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
|
||||||
}
|
}
|
||||||
bool RollIn::IsFinished(){
|
bool RollIn::IsFinished(){
|
||||||
return DentRobot::collector->BoxCollected()||IsTimedOut();
|
return IsTimedOut();
|
||||||
}
|
}
|
||||||
void RollIn::End(){
|
void RollIn::End(){
|
||||||
DentRobot::collector->MoveRollers(0.0);
|
DentRobot::collector->MoveRollers(0.0);
|
||||||
|
@ -11,7 +11,7 @@ void RollOut::Execute(){
|
|||||||
DentRobot::collector->MoveRollers((-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2/2);
|
DentRobot::collector->MoveRollers((-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2/2);
|
||||||
}
|
}
|
||||||
bool RollOut::IsFinished(){
|
bool RollOut::IsFinished(){
|
||||||
return DentRobot::collector->BoxCollected();
|
return IsTimedOut();
|
||||||
}
|
}
|
||||||
void RollOut::End(){
|
void RollOut::End(){
|
||||||
DentRobot::collector->MoveRollers(0.0f);
|
DentRobot::collector->MoveRollers(0.0f);
|
||||||
|
@ -21,7 +21,7 @@ void Drive::Execute(){
|
|||||||
DentRobot::drivetrain->DriveMecanum(x,y,z,0.9,0);
|
DentRobot::drivetrain->DriveMecanum(x,y,z,0.9,0);
|
||||||
}
|
}
|
||||||
bool Drive::IsFinished(){
|
bool Drive::IsFinished(){
|
||||||
return false;
|
return IsTimedOut();
|
||||||
}
|
}
|
||||||
void Drive::End(){
|
void Drive::End(){
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,4 @@ void Collector::MoveRollers(double a){
|
|||||||
collectorMotorBottom->Set(a);
|
collectorMotorBottom->Set(a);
|
||||||
collectorMotorRight->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
|
// vim: ts=2:sw=2:et
|
||||||
|
@ -10,8 +10,6 @@ class Collector: public Subsystem
|
|||||||
Collector();
|
Collector();
|
||||||
void InitDefaultCommand();
|
void InitDefaultCommand();
|
||||||
void MoveRollers(double);
|
void MoveRollers(double);
|
||||||
bool ArmSensor();
|
|
||||||
bool BoxCollected();
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// vim: ts=2:sw=2:et
|
// vim: ts=2:sw=2:et
|
||||||
|
Loading…
Reference in New Issue
Block a user