-launch_spinny
+ramp
This commit is contained in:
parent
a983987fa2
commit
a786907f72
@ -20,7 +20,7 @@ class Robot: public IterativeRobot
|
||||
{
|
||||
Talon left_drive, right_drive;
|
||||
CANTalon shooter1, shooter2,
|
||||
launch_spinny,
|
||||
ramp,
|
||||
arms;
|
||||
RobotDrive drive;
|
||||
Shooter shooter;
|
||||
@ -31,11 +31,11 @@ public:
|
||||
right_drive(1), // Right DriveTrain Talons plug // left wheel 2
|
||||
shooter1(11), // shooter drive 1
|
||||
shooter2(10), // shooter drive 2
|
||||
launch_spinny(12),
|
||||
ramp(12),
|
||||
arms(13),
|
||||
drive(&left_drive, &right_drive),
|
||||
shooter( // initialize Shooter object.
|
||||
&shooter1, &shooter2, &launch_spinny),
|
||||
&shooter1, &shooter2, &ramp),
|
||||
driver_stick(0), // right stick (operator)
|
||||
operator_stick(1) // left stick (driver)
|
||||
{
|
||||
@ -68,7 +68,7 @@ private:
|
||||
shooter2.Enable();
|
||||
left_drive.SetInverted(true);
|
||||
right_drive.SetInverted(true);
|
||||
//launch_spinny.SetInverted(true);
|
||||
//ramp.SetInverted(true);
|
||||
inverting = false;
|
||||
pickupRunning = false;
|
||||
ramping = false;
|
||||
@ -127,14 +127,14 @@ private:
|
||||
if(!ramping && operator_stick.GetRawButton(RAMP_RAISE))
|
||||
{
|
||||
std::cout << "Raising Ramp.";
|
||||
//launch_spinny.Set(1);
|
||||
//ramp.Set(1);
|
||||
shooter.RaiseRamp();
|
||||
ramping =true;
|
||||
}
|
||||
else if(!ramping && operator_stick.GetRawButton(RAMP_LOWER))
|
||||
{
|
||||
std::cout << "Lowering Ramp.";
|
||||
//launch_spinny.Set(-1);
|
||||
//ramp.Set(-1);
|
||||
shooter.LowerRamp();
|
||||
ramping = true;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
// shooterDrive = new RobotDrive(s1, s2);
|
||||
launcher = s1;
|
||||
pickup = s2;
|
||||
launch_spinny = r;
|
||||
ramp = r;
|
||||
ready = true;
|
||||
state = READY;
|
||||
}
|
||||
@ -51,35 +51,35 @@ public:
|
||||
{
|
||||
delete launcher;
|
||||
delete pickup;
|
||||
delete launch_spinny;
|
||||
delete ramp;
|
||||
}
|
||||
|
||||
void StopShooter()
|
||||
{
|
||||
ready = true;
|
||||
launch_spinny->Set(0);
|
||||
ramp->Set(0);
|
||||
launcher->Set(0);
|
||||
pickup->Set(0);
|
||||
}
|
||||
|
||||
void LowerRamp()
|
||||
{
|
||||
launch_spinny->Set(-1);
|
||||
ramp->Set(-1);
|
||||
}
|
||||
|
||||
void RaiseRamp()
|
||||
{
|
||||
launch_spinny->Set(1);
|
||||
ramp->Set(1);
|
||||
}
|
||||
|
||||
void StopRamp()
|
||||
{
|
||||
launch_spinny->Set(0);
|
||||
ramp->Set(0);
|
||||
}
|
||||
|
||||
void BoostRamp()
|
||||
{
|
||||
launch_spinny->Set(1);
|
||||
ramp->Set(1);
|
||||
}
|
||||
|
||||
void Shoot()
|
||||
@ -96,7 +96,7 @@ public:
|
||||
case READY:
|
||||
{
|
||||
state = SPINNINGUP;
|
||||
launch_spinny->Set(-1);
|
||||
ramp->Set(-1);
|
||||
launcher->Set(PICKUP_POWER);
|
||||
pickup->Set(PICKUP_POWER);
|
||||
shotClock.Reset();
|
||||
@ -118,7 +118,7 @@ public:
|
||||
}
|
||||
case LAUNCH:
|
||||
{
|
||||
launch_spinny->Set(1);
|
||||
ramp->Set(1);
|
||||
state = LAUNCHING;
|
||||
break;
|
||||
}
|
||||
@ -139,7 +139,7 @@ public:
|
||||
{
|
||||
pickup->Set((float) (state * PICKUP_POWER));
|
||||
launcher->Set((float) (state * PICKUP_POWER * -1));
|
||||
//launch_spinny->Set(-1.0*PICKUP_POWER);
|
||||
//ramp->Set(-1.0*PICKUP_POWER);
|
||||
//std::cout << "picking up!\n";
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ private:
|
||||
//RobotDrive *shooterDrive;
|
||||
CANTalon *launcher;
|
||||
CANTalon *pickup;
|
||||
CANTalon *launch_spinny;
|
||||
CANTalon *ramp;
|
||||
ShooterState state;
|
||||
|
||||
Timer shotClock;
|
||||
|
Reference in New Issue
Block a user