From a408e87edf2c0762356cad7fb12d3d59c946b7d8 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 1 Nov 2014 17:17:35 -0700 Subject: [PATCH] Changed values and added daniel mode to Rstick throttle --- src/Zaphod.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Zaphod.cpp b/src/Zaphod.cpp index 6d5f8d4..ccaee9f 100644 --- a/src/Zaphod.cpp +++ b/src/Zaphod.cpp @@ -93,8 +93,8 @@ public: SmartDashboard::PutNumber("AutoSpeed",0.65f); SmartDashboard::PutNumber("Auto Distance",57.0f); SmartDashboard::PutNumber("Collector Speed",1.0f); - SmartDashboard::PutNumber("AutoPower",0.74f); - SmartDashboard::PutNumber("AutoCorrection",0.08f); + SmartDashboard::PutNumber("AutoPower",0.72f); + SmartDashboard::PutNumber("AutoCorrection",0.05f); SmartDashboard::PutNumber("Initial Drive Delay",2.0f); SmartDashboard::PutNumber("Inital Drive Timeout",4.5f); SmartDashboard::PutNumber("First Shot Start",0.5f); @@ -731,6 +731,7 @@ public: if(currentStep==6){ runningAuto=false; compressorEnabled=true; + SmartDashboard::PutBoolean("Compressor Enabled",true); } c++; //}}} @@ -808,7 +809,13 @@ public: setMotorValue(6,1,0); } //}}} - driveRobot(-Rstick.GetY(),Rstick.GetZ()+Rstick.GetX()); + // Reverse driving direction if throttle is above .5 + if(Rstick.GetRawAxis(4)>=0.5f){ + driveRobot(Rstick.GetY(),-(Rstick.GetZ()+Rstick.GetX())); + }else{ + driveRobot(-Rstick.GetY(),Rstick.GetZ()+Rstick.GetX()); + } + } //}}} runCompressor(i,100);