From 6dbf8665a7816c4f04cdf32734b47ab454775cfb Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 27 Feb 2014 17:17:40 +0000 Subject: [PATCH] made code changes --- MyRobot.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MyRobot.cpp b/MyRobot.cpp index 60a9347..859e44a 100644 --- a/MyRobot.cpp +++ b/MyRobot.cpp @@ -1,7 +1,7 @@ //Sonar code #include "WPILib.h" #include "SmartDashboard/SmartDashboard.h" -//#include "Command.h" +#include "Command.h" #include #include #include @@ -128,8 +128,6 @@ public: upLimit = 167; } } - void calcRobot(){ - } void shootRobot(float power=0, bool override=false) { override=true; //Needs a limit to help the driver aim @@ -324,15 +322,17 @@ public: } } else { if(i<=initalDriveTime*200) { + //Drive initialDriveTime amount of time driveRobot(1.0f,0.0f); - //setMotorValue(6, 1, 1); } else if(i>shooterDelay&&i=potToDegrees(armPot.GetAverageVoltage())) { - driveRobot(0, 0); - shootRobot(1, true); + //Shooting + driveRobot(0.0f, 0.0f); + shootRobot(1.0f, true); setMotorValue(6, 1, 1); } if(i>480&&i<430+initalDriveTime){ - driveRobot(-1,0); + driveRobot(-1.0f,0.0f); + setMotorValue(6, 1, 0); //TODO } else if(i>430+initalDriveTime/*&&ballLimit.Get()==1*/) { driveRobot(-0.6f,0.0f); @@ -340,6 +340,7 @@ public: //TODO } else if(/*ballLimit.Get()==1&&*/i>430+initalDriveTime) { driveRobot(1.0f,0.0f); + setMotorValue(6, 1, 0); } if(i>480&&i<480){ shootRobot(0.25f,true);