diff --git a/Commands/Autonomous/Autonomous.cpp b/Commands/Autonomous/Autonomous.cpp index 5a147c2..80a14f2 100644 --- a/Commands/Autonomous/Autonomous.cpp +++ b/Commands/Autonomous/Autonomous.cpp @@ -27,7 +27,7 @@ Autonomous::Autonomous(int seq){ case 2: // Lower BinElevator, collect bin, turn, drive to AutoZone (TM) AddSequential(new BinLower(0.5)); - AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Bin Distance"), 0, 0.75)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Bin Distance"), 0.0, 0.75)); AddSequential(new BinRaise(1.0)); AddSequential(new Turn(SmartDashboard::GetNumber("TurnAmount"))); AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), 0.0, -0.75)); @@ -50,19 +50,19 @@ Autonomous::Autonomous(int seq){ AddSequential(new CollectTote()); if(SmartDashboard::GetBoolean("Two totes")){ AddSequential(new Raise(3.5)); - AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), 0, 0.75)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), 0.0, 0.75)); AddSequential(new CollectTote()); AddSequential(new Lower(3.0)); AddSequential(new Raise(3.5)); if(SmartDashboard::GetBoolean("Three totes")){ - AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), 0, 0.75)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), 0.0, 0.75)); AddSequential(new CollectTote()); AddSequential(new Lower(3.0)); AddSequential(new Raise(3.5)); } } AddSequential(new Turn(SmartDashboard::GetNumber("TurnAmount"))); - AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), 0, 0.75)); + AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), 0.0, 0.75)); AddSequential(new ReleaseTote()); break; case 5: diff --git a/Commands/Autonomous/CollectTote.cpp b/Commands/Autonomous/CollectTote.cpp index 5ee7deb..2c38c71 100644 --- a/Commands/Autonomous/CollectTote.cpp +++ b/Commands/Autonomous/CollectTote.cpp @@ -3,7 +3,7 @@ #include "AutoDrive.h" #include "../Collector/RollIn.h" CollectTote::CollectTote(){ - AddParallel(new AutoDrive(1.0, -0.75, 0.0)); + AddParallel(new AutoDrive(1.0, 0.0, -0.75)); AddSequential(new RollIn(1.0)); } // vim: ts=2:sw=2:et diff --git a/Commands/Collector/RollIn.cpp b/Commands/Collector/RollIn.cpp index f87de00..89118fd 100644 --- a/Commands/Collector/RollIn.cpp +++ b/Commands/Collector/RollIn.cpp @@ -7,12 +7,13 @@ void RollIn::Initialize(){ SetTimeout(2.0); } void RollIn::Execute(){ - double cvt=(rawSpeed)*DentRobot::collector->GetSonarDistance()/0.4; - if(cvt>=1.0){ - DentRobot::collector->MoveRollers(1.0); - }else{ - DentRobot::collector->MoveRollers(cvt*1.5); - } + //double cvt=(rawSpeed)*DentRobot::collector->GetSonarDistance()/0.4; + //if(cvt<=1.0){ + // DentRobot::collector->MoveRollers(1.0); + //}else{ + // DentRobot::collector->MoveRollers(cvt*1.5); + //} + DentRobot::collector->MoveRollers(DentRobot::oi->GetLeftThrottle() * 0.8); } bool RollIn::IsFinished(){ return IsTimedOut();