added good ramp code
This commit is contained in:
parent
52ecff29e8
commit
ce69ef14b6
@ -119,26 +119,23 @@ private:
|
||||
|
||||
//bool rampDoing = false;
|
||||
// This is shit code for testing. Replace it with real code.
|
||||
if(operator_stick.GetRawButton(RAMP_LOWER))
|
||||
if(!ramping && operator_stick.GetRawButton(RAMP_LOWER))
|
||||
{
|
||||
std::cout << "Lowering Ramp.";
|
||||
//ramp.Set(-1);
|
||||
shooter.LowerRamp();
|
||||
ramping = true;
|
||||
}
|
||||
/*else if(!ramping && operator_stick.GetRawButton(TRIGGER))
|
||||
{
|
||||
shooter.BoostRamp();
|
||||
ramping = true;
|
||||
}*/
|
||||
else if(ramping
|
||||
&& !operator_stick.GetRawButton(RAMP_LOWER)
|
||||
&& ramp.GetForwardLimitOK())
|
||||
else if(!ramping
|
||||
&& !operator_stick.GetRawButton(RAMP_RAISE))
|
||||
{
|
||||
shooter.RaiseRamp();
|
||||
ramping = true;
|
||||
}
|
||||
else
|
||||
else if(ramping && !operator_stick.GetRawButton(RAMP_RAISE)
|
||||
&& !operator_stick.GetRawButton(RAMP_LOWER))
|
||||
{
|
||||
shooter.StopRamp();
|
||||
ramping = false;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
|
||||
void LowerRamp()
|
||||
{
|
||||
ramp->Set(-1);
|
||||
ramp->Set(-0.5);
|
||||
if(ramp->Limits::kReverseLimit){
|
||||
SmartDashboard::PutNumber("ramp", 2); //going to put a circlar dial to show where the ramp could be
|
||||
} else {
|
||||
@ -74,7 +74,7 @@ public:
|
||||
|
||||
void RaiseRamp()
|
||||
{
|
||||
ramp->Set(1);
|
||||
ramp->Set(0.5);
|
||||
if(ramp->Limits::kForwardLimit){
|
||||
SmartDashboard::PutNumber("ramp", 0); //going to put a circlar dial to show where the ramp could be
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user