diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-11-18 15:55:32 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-11-18 15:55:32 -0600 |
commit | 8167e5ad0453f2e6855f9622c2acddb9cf55c941 (patch) | |
tree | 3e8a2ab1198c174f65e7d055c854f59017a27c24 | |
parent | d48510e9c3a57753ff4b33b00e0c61a2b39ff9a1 (diff) | |
download | mtdot-box-evb-factory-firmware-8167e5ad0453f2e6855f9622c2acddb9cf55c941.tar.gz mtdot-box-evb-factory-firmware-8167e5ad0453f2e6855f9622c2acddb9cf55c941.tar.bz2 mtdot-box-evb-factory-firmware-8167e5ad0453f2e6855f9622c2acddb9cf55c941.zip |
get things building again - remove config code in main, fix bug in ModeJoin
-rw-r--r-- | CommandTerminal/Command.h | 1 | ||||
-rw-r--r-- | Mode/ModeJoin.cpp | 4 | ||||
-rw-r--r-- | 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 <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(); } @@ -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(); |