From 2a3ddd6041b8d07a3158302b1cb13965e4c01096 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Fri, 27 Feb 2015 15:56:29 +0000 Subject: [PATCH] Updated auto sequence 2 --- Commands/Autonomous/Autonomous.cpp | 1 + Commands/Autonomous/Turn.cpp | 2 +- DentRobot.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Commands/Autonomous/Autonomous.cpp b/Commands/Autonomous/Autonomous.cpp index 5eed551..b076a0b 100644 --- a/Commands/Autonomous/Autonomous.cpp +++ b/Commands/Autonomous/Autonomous.cpp @@ -30,6 +30,7 @@ Autonomous::Autonomous(int seq){ AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"),0.75,0.0)); //AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), 0.0,-1.0)); AddSequential(new BinLower(1.0)); + AddSequential(new Turn(SmartDashboard::GetNumber("TurnAmount"))); break; case 3: // Collect three totes, drive to Auto Zone (TM) diff --git a/Commands/Autonomous/Turn.cpp b/Commands/Autonomous/Turn.cpp index 508eb1e..8af955b 100644 --- a/Commands/Autonomous/Turn.cpp +++ b/Commands/Autonomous/Turn.cpp @@ -9,7 +9,7 @@ void Turn::Initialize(){ } void Turn::Execute(){ //X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle), gyro - DentRobot::drivetrain->DriveMecanum(0.0,0.0,0.65,0.9,0.0); + DentRobot::drivetrain->DriveMecanum(0.0,0.0,0.6,0.9,0.0); } bool Turn::IsFinished(){ return IsTimedOut(); diff --git a/DentRobot.cpp b/DentRobot.cpp index 5798f12..e7d15bc 100644 --- a/DentRobot.cpp +++ b/DentRobot.cpp @@ -32,10 +32,10 @@ void DentRobot::RobotInit(){ SmartDashboard::PutBoolean("Three totes", true); // TODO: Calibrate the following two values // Distance (in time) to auto zone - SmartDashboard::PutNumber("Auto Zone Distance", 3.0); + SmartDashboard::PutNumber("Auto Zone Distance", 2.8); // Distance (in time) to auto tote (used in sequence 3) SmartDashboard::PutNumber("Auto Tote Distance", 0.5); - SmartDashboard::PutNumber("TurnAmount",1.9); + SmartDashboard::PutNumber("TurnAmount",2); // Elevators SmartDashboard::PutBoolean("Bin Elevator Bottom", false);