summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CommandTerminal/Command.h1
-rw-r--r--Mode/ModeJoin.cpp4
-rw-r--r--main.cpp17
3 files changed, 3 insertions, 19 deletions
diff --git a/CommandTerminal/Command.h b/CommandTerminal/Command.h
index bf46158..c48bd59 100644
--- a/CommandTerminal/Command.h
+++ b/CommandTerminal/Command.h
@@ -40,7 +40,6 @@
#include <string>
#include <vector>
#include "limits.h"
-#include "debug.h"
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __command_H
diff --git a/Mode/ModeJoin.cpp b/Mode/ModeJoin.cpp
index f1f0e9a..acdd407 100644
--- a/Mode/ModeJoin.cpp
+++ b/Mode/ModeJoin.cpp
@@ -19,6 +19,8 @@ ModeJoin::~ModeJoin() {}
bool ModeJoin::start() {
// clear any stale signals
osSignalClear(_main_id, buttonSignal | loraSignal);
+ _joined = false;
+ _index = 1;
_lj.display();
_lj.updateStatus("Joining...");
@@ -45,7 +47,7 @@ bool ModeJoin::start() {
if (_next_tx) {
_lj.updateCountdown(_next_tx * 1000);
} else {
- _lj.updateAttempt(++_index);
+ _lj.updateAttempt(_index++);
_lj.updateStatus("Joining...");
_lora->join();
}
diff --git a/main.cpp b/main.cpp
index 5b9cbde..9b9b165 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,7 +4,6 @@
// MTS headers
#include "mDot.h"
#include "MTSLog.h"
-#include "MTSText.h"
// sensor headers
#include "ISL29011.h"
#include "MMA845x.h"
@@ -53,8 +52,6 @@ ModeJoin* modeJoin;
Serial debug(USBTX, USBRX);
mts::MTSSerial serial(USBTX, USBRX, 512, 512);
-
-
// Prototypes
void mainMenu();
void join();
@@ -124,20 +121,6 @@ void mainMenu() {
items.push_back(menu_strings[single]);
items.push_back(menu_strings[sweep]);
-
-
- mDot* dot = mDot::getInstance();
- if(dot){
- logInfo("dot created");
- CommandTerminal term(serial, dot);
- term.start();
- }
- else {
- logInfo("Radio Init Failed!");
- }
-
-
-
while (true) {
LayoutScrollSelect menu(lcd, items, menu_strings[0], menu_strings[1]);
menu.display();