From 8167e5ad0453f2e6855f9622c2acddb9cf55c941 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 18 Nov 2015 15:55:32 -0600 Subject: get things building again - remove config code in main, fix bug in ModeJoin --- CommandTerminal/Command.h | 1 - Mode/ModeJoin.cpp | 4 +++- main.cpp | 17 ----------------- 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 #include #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(); -- cgit v1.2.3