2015-02-06 13:45:01 -05:00
|
|
|
#include "Autonomous.h"
|
|
|
|
#include "../../DentRobot.h"
|
2015-02-07 12:50:36 -05:00
|
|
|
#include "../Elevator/Raise.h"
|
2015-02-08 16:51:35 -05:00
|
|
|
#include "../Elevator/Lower.h"
|
|
|
|
#include "AutoDrive.h"
|
|
|
|
#include "Turn.h"
|
|
|
|
#include "../Collector/CloseCollector.h"
|
|
|
|
#include "../Collector/OpenCollector.h"
|
2015-02-13 19:40:23 -05:00
|
|
|
#include "../Collector/RollIn.h"
|
2015-02-13 22:30:15 -05:00
|
|
|
#include "../Collector/CollectTote.h"
|
2015-02-13 17:34:38 -05:00
|
|
|
Autonomous::Autonomous(int seq){
|
2015-02-13 22:30:15 -05:00
|
|
|
//SmartDashboard::GetNumber("Auto Wait Time");
|
2015-02-13 17:34:38 -05:00
|
|
|
switch(seq){
|
|
|
|
case 0:
|
|
|
|
// Just for testing
|
2015-02-13 22:30:15 -05:00
|
|
|
AddSequential(new CollectTote());
|
|
|
|
//AddSequential(new Raise());
|
|
|
|
//AddSequential(new Lower());
|
|
|
|
//AddSequential(new OpenCollector());
|
|
|
|
//AddSequential(new CloseCollector());
|
|
|
|
//AddSequential(new Turn());
|
|
|
|
//AddParallel(new AutoDrive(0.5));
|
|
|
|
//AddParallel(new CloseCollector());
|
|
|
|
//AddSequential(new RollIn());
|
|
|
|
//AddSequential(new Turn());
|
2015-02-13 17:34:38 -05:00
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
// Drive forward a bit, turn around, collect tote then bin
|
|
|
|
AddSequential(new AutoDrive(0.5));
|
|
|
|
AddSequential(new Turn());
|
|
|
|
AddSequential(new Turn());
|
2015-02-13 19:40:23 -05:00
|
|
|
AddSequential(new RollIn());
|
2015-02-13 22:30:15 -05:00
|
|
|
AddSequential(new Raise());
|
2015-02-13 17:34:38 -05:00
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
// Drive forward a bit, turn around, collect tote then bin
|
|
|
|
AddParallel(new Raise());
|
|
|
|
AddParallel(new AutoDrive(0.5));
|
|
|
|
AddSequential(new Turn());
|
|
|
|
AddSequential(new Turn());
|
2015-02-13 19:40:23 -05:00
|
|
|
AddSequential(new RollIn());
|
2015-02-13 17:34:38 -05:00
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
// Wait a desigated value, drive to Auto Zone (TM)
|
2015-02-13 22:30:15 -05:00
|
|
|
//Wait(SmartDashboard::GetNumber("Auto Wait Time"));
|
2015-02-13 17:34:38 -05:00
|
|
|
AddSequential(new AutoDrive(2.0));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
printf("Invalid seq: %d\n", seq);
|
|
|
|
break;
|
|
|
|
}
|
2015-02-06 13:45:01 -05:00
|
|
|
}
|
2015-02-08 12:26:15 -05:00
|
|
|
// vim: ts=2:sw=2:et
|