diff --git a/Commands/Autonomous/AutoDrive.cpp b/Commands/Autonomous/AutoDrive.cpp index 0636003..24fce24 100644 --- a/Commands/Autonomous/AutoDrive.cpp +++ b/Commands/Autonomous/AutoDrive.cpp @@ -4,21 +4,22 @@ AutoDrive::AutoDrive(double wait) : Command("AutoDrive"){ Requires(DentRobot::drivetrain); SetTimeout(wait); - power=NULL; + power=5; } AutoDrive::AutoDrive(double wait, double p) : Command("AutoDrive"){ Requires(DentRobot::drivetrain); SetTimeout(wait); - *power=p; + power=p; } void AutoDrive::Initialize(){ } void AutoDrive::Execute(){ //X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle), gyro - if(power==NULL){ + //if(power==NULL){ + if(power==5){ DentRobot::drivetrain->DriveMecanum(0.0,-.75,0.0,0.9,0.0); }else{ - DentRobot::drivetrain->DriveMecanum(0.0,*power,0.0,0.9,0.0); + DentRobot::drivetrain->DriveMecanum(0.0,power,0.0,0.9,0.0); } } bool AutoDrive::IsFinished(){ diff --git a/Commands/Autonomous/AutoDrive.h b/Commands/Autonomous/AutoDrive.h index 3c1e9ae..f2d4785 100644 --- a/Commands/Autonomous/AutoDrive.h +++ b/Commands/Autonomous/AutoDrive.h @@ -8,7 +8,7 @@ class AutoDrive: public Command{ private: - double *power; + double power; public: AutoDrive(double); AutoDrive(double, double); diff --git a/Commands/Collector/CollectTote.cpp b/Commands/Collector/CollectTote.cpp index 141738c..cf2397b 100644 --- a/Commands/Collector/CollectTote.cpp +++ b/Commands/Collector/CollectTote.cpp @@ -5,8 +5,8 @@ #include "CloseCollector.h" CollectTote::CollectTote(){ AddParallel(new CloseCollector()); - AddSequential(new RollIn()); // TODO: Fix null error //AddParallel(new AutoDrive(0.5, -0.75)); + AddSequential(new RollIn()); } // vim: ts=2:sw=2:et