From 5193cbb59abd4e187454f9fb56a36ad93f57f207 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Thu, 19 Mar 2015 12:52:16 +0000 Subject: [PATCH] Added older auto sequences --- Commands/Autonomous/AutoDrive.cpp | 2 +- Commands/Autonomous/Autonomous.cpp | 14 ++++++++++++++ Commands/Collector/RollIn.cpp | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Commands/Autonomous/AutoDrive.cpp b/Commands/Autonomous/AutoDrive.cpp index 0ec19b8..143fc06 100644 --- a/Commands/Autonomous/AutoDrive.cpp +++ b/Commands/Autonomous/AutoDrive.cpp @@ -7,7 +7,7 @@ AutoDrive::AutoDrive(double duration, double xtmp, double ytmp, double ztmp, boo x=xtmp; y=ytmp; z=ztmp; - gyro=false; + gyro=useGyro; } void AutoDrive::Initialize(){ DentRobot::drivetrain->ResetGyro(); diff --git a/Commands/Autonomous/Autonomous.cpp b/Commands/Autonomous/Autonomous.cpp index 2fe6ed7..bc9d77b 100644 --- a/Commands/Autonomous/Autonomous.cpp +++ b/Commands/Autonomous/Autonomous.cpp @@ -74,6 +74,20 @@ Autonomous::Autonomous(int seq){ // Same as auto 4 with (Three|Two) totes checked, collect bin, drive to Auto Zone (TM), release totes //TODO: Implement this break; + case 8: + //Use rear elevator to move tote + AddSequential(new BinRaise(1)); + AddSequential(new Turn(2.1)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"),0.0,0.75)); + AddSequential(new Turn(2.1)); + break; + case 9: + //Use rear elevator to move tote + AddSequential(new BinLower(1.5)); + AddSequential(new Turn(2.1)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"),0.0,-0.75)); + AddSequential(new Turn(2.1)); + break; default: printf("Invalid seq: %d\n", seq); break; diff --git a/Commands/Collector/RollIn.cpp b/Commands/Collector/RollIn.cpp index 89118fd..816aa81 100644 --- a/Commands/Collector/RollIn.cpp +++ b/Commands/Collector/RollIn.cpp @@ -13,7 +13,7 @@ void RollIn::Execute(){ //}else{ // DentRobot::collector->MoveRollers(cvt*1.5); //} - DentRobot::collector->MoveRollers(DentRobot::oi->GetLeftThrottle() * 0.8); + DentRobot::collector->MoveRollers(DentRobot::oi->GetLeftThrottle() * 1.0); } bool RollIn::IsFinished(){ return IsTimedOut();