From 71b8e5eeff89bd93199955c468a9890df9ffa0ed Mon Sep 17 00:00:00 2001 From: Aidan Ferguson Date: Thu, 11 Feb 2016 17:17:42 -0500 Subject: [PATCH] launch spinny does stuff --- src/Robot.cpp | 14 +++++++------- src/Shooter.h | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Robot.cpp b/src/Robot.cpp index a4073cb..3111ca2 100644 --- a/src/Robot.cpp +++ b/src/Robot.cpp @@ -15,7 +15,7 @@ class Robot: public IterativeRobot { Talon left_drive, right_drive; CANTalon shooter1, shooter2, - ramp; + launch_spinny; RobotDrive drive; Shooter shooter; Joystick driver_stick, operator_stick; @@ -25,10 +25,10 @@ public: right_drive(1), // Right DriveTrain Talons plug // left wheel 2 shooter1(11), // shooter drive 1 shooter2(10), // shooter drive 2 - ramp(12), + launch_spinny(12), drive(&left_drive, &right_drive), shooter( // initialize Shooter object. - &shooter1, &shooter2, &ramp), + &shooter1, &shooter2, &launch_spinny), driver_stick(0), // right stick (operator) operator_stick(1) // left stick (driver) { @@ -101,21 +101,21 @@ private: void TeleopPeriodic() { - std::cout << "Ramp position: "<< ramp.GetEncPosition() << std::endl; + std::cout << "Ramp position: "<< launch_spinny.GetEncPosition() << std::endl; drive.ArcadeDrive(&driver_stick, true); // This is shit code for testing. Replace it with real code. if(operator_stick.GetRawButton(RAMP_RAISE)) { - ramp.Set(1); + launch_spinny.Set(1); } else if(operator_stick.GetRawButton(RAMP_LOWER)) { - ramp.Set(-1); + launch_spinny.Set(-1); } else { - ramp.Set(0); + launch_spinny.Set(0); } if(operator_stick.GetRawButton(THUMB) && !pickupRunning) diff --git a/src/Shooter.h b/src/Shooter.h index 2486d8a..f63bdf1 100644 --- a/src/Shooter.h +++ b/src/Shooter.h @@ -8,7 +8,7 @@ #ifndef SRC_SHOOTER_H_ #define SRC_SHOOTER_H_ -#define PICKUP_POWER 0.8 +#define PICKUP_POWER 1.0 class Shooter { public: @@ -37,6 +37,7 @@ public: void PickUp(bool state = true) { pickup->Set((float) (state * PICKUP_POWER)); + launch_spinny->Set(-1.0*PICKUP_POWER); std::cout << "picking up!\n"; }