Skip to content

Commit 18f2fce

Browse files
author
Tom Lazar
committed
Added in some final values for the DefenceBreaker Autonomous code
1 parent 2f570e1 commit 18f2fce

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/Autonomous/CommandListMaker.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
CommandListMaker::CommandListMaker(IProfile *p) {
1212
profile = p;
13-
storage = new std::vector<stepBase*>();
13+
storage = NULL;
1414

1515
// TODO Auto-generated constructor stub
1616
}
@@ -76,6 +76,12 @@ void CommandListMaker::makeBasic() {
7676

7777
void CommandListMaker::makeDefenceBreaker() {
7878

79+
if(storage != NULL){
80+
delete storage;
81+
storage = NULL;
82+
}
83+
storage = new std::vector<stepBase*>();
84+
7985
/* Gets the current selction from the dashboard (should default to LowBar)*/
8086
//Selection
8187
void* temp = autoPosition->GetSelected();

src/Robot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Robot: public IterativeRobot {
9696
x = 0;
9797
SmartDashboard::PutString("State", "Autonomous Init");
9898

99-
clMaker->makeBasic();
99+
clMaker->makeDefenceBreaker();
100100
auton = clMaker->getList();
101101

102102
nLNode* test = master->head;

0 commit comments

Comments
 (0)