From 4488d771b4584f9427b8a7c96022d528df8199c5 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Tue, 9 Feb 2016 17:27:58 -0500 Subject: [PATCH] Added some more sane code that has no effect because it only calls empty methods. --- src/Robot.cpp | 2 ++ src/Shooter.h | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Robot.cpp b/src/Robot.cpp index 224e2f4..fea8d6f 100644 --- a/src/Robot.cpp +++ b/src/Robot.cpp @@ -68,6 +68,7 @@ private: void AutonomousInit() { shooter.CalibrateRamp(); + shooter.SetRamp(Shoot); autoSelected = *((std::string*)chooser->GetSelected()); //std::string autoSelected = SmartDashboard::GetString("Auto Selector", autoNameDefault); @@ -92,6 +93,7 @@ private: void TeleopInit() { shooter.CalibrateRamp(); + shooter.SetRamp(Shoot); // start in the full up position! } void TeleopPeriodic() diff --git a/src/Shooter.h b/src/Shooter.h index 6971715..1fe8b0e 100644 --- a/src/Shooter.h +++ b/src/Shooter.h @@ -21,9 +21,10 @@ */ enum RampState { Shoot = 0, // 0 rotations - Half = 1, // 1 rotation? - Down = 2, // 2 rotations? - Uncalibrated = -1 + Half = (RAMP_LOWER_DURATION / 2), // 1 rotation? + Down = RAMP_LOWER_DURATION, // 2 rotations? + Uncalibrated = -1, + Transitioning = -2 }; class Shooter { @@ -85,6 +86,8 @@ private: CANTalon *ramp; RampState rampState; + RampState targetState; + RampState previousState; }; #endif /* SRC_SHOOTER_H_ */