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