diff options
author | Leon Lindenfelser <llindenfelser@multitech.com> | 2015-11-20 10:23:26 -0600 |
---|---|---|
committer | Leon Lindenfelser <llindenfelser@multitech.com> | 2015-11-20 10:23:26 -0600 |
commit | 393317f7d04753d6e9773393a96c311a88a27f7b (patch) | |
tree | 07b95a83d17e455b4f2b2678dd9f41c197763a77 /main.cpp | |
parent | eb527712baa96d65f0a4bd5d0ce3ec19a708f6f7 (diff) | |
download | mtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.tar.gz mtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.tar.bz2 mtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.zip |
AT commands are working in modeConfig.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 33 |
1 files changed, 4 insertions, 29 deletions
@@ -24,6 +24,7 @@ #include "LoRaHandler.h" // mode objects #include "ModeJoin.h" +#include "ModeConfig.h" // misc heders #include <string> @@ -47,10 +48,10 @@ mDot* dot; // Modes ModeJoin* modeJoin; +ModeConfig* modeConfig; // Serial debug port Serial debug(USBTX, USBRX); -mts::MTSSerial serial(USBTX, USBRX, 512, 512); // Prototypes void mainMenu(); @@ -72,6 +73,7 @@ int main() { lora = new LoRaHandler(main_id); modeJoin = new ModeJoin(lcd, buttons, dot, lora, dot->getFrequencyBand()); + modeConfig = new ModeConfig(lcd, buttons, dot); // display startup screen for 3 seconds LayoutStartup ls(lcd); @@ -149,7 +151,7 @@ void mainMenu() { if (modeJoin->start()) loraDemo(); } else if (selected == menu_strings[config]) { - configuration(); + modeConfig->start(); } else if (selected == menu_strings[single]) { if (modeJoin->start()) surveySingle(); @@ -162,33 +164,6 @@ void mainMenu() { } } -void configuration() { - LayoutConfig lc(lcd); - - // clear any stale signals - osSignalClear(main_id, buttonSignal | loraSignal); - - lc.display(); - logInfo("config mode"); - - while (true) { - osEvent e = Thread::signal_wait(buttonSignal); - if (e.status == osEventSignal) { - ButtonHandler::ButtonEvent ev = buttons->getButtonEvent(); - switch (ev) { - case ButtonHandler::sw1_press: - break; - case ButtonHandler::sw2_press: - break; - case ButtonHandler::sw1_hold: - return; - default: - break; - } - } - } -} - void loraDemo() { LayoutDemoHelp ldh(lcd); |