From 0c67d001093735c75f93343a05635d9c5bba14f3 Mon Sep 17 00:00:00 2001 From: Aidan Ferguson Date: Sat, 20 Feb 2016 13:58:35 -0500 Subject: [PATCH] untested one-touch shooting --- Robot2016/src/Robot.cpp | 2 +- Robot2016/src/Shooter.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 3e4dc1b..790269d 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -202,7 +202,7 @@ private: * Every time the method is called. This cannot be a loop in the Shoot method because * that would lock the robot every time the trigger is hit. */ - if(operator_stick.GetRawButton(TRIGGER)) + if(operator_stick.GetRawButton(TRIGGER) || (shooter.GetState() != 0)) { shooting = true; shooter.Shoot(); diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index f948abe..cffe153 100644 --- a/Robot2016/src/Shooter.h +++ b/Robot2016/src/Shooter.h @@ -175,6 +175,11 @@ public: launcher->Set(power); //std::cout << "setting shooter power" << std::endl; } + + int GetState() + { + return state; + } private: //RobotDrive *shooterDrive;