diff options
author | Ryan Klaassen <ryan.klaassen@multitech.com> | 2016-08-08 10:11:08 -0500 |
---|---|---|
committer | Ryan Klaassen <ryan.klaassen@multitech.com> | 2016-08-08 10:11:08 -0500 |
commit | 54270b95f3fe169948ef551c49204defcda4033b (patch) | |
tree | 2faca4b0433efe4a0c9ffb7ae183cbb8854a55f2 | |
parent | c8405492c3e606560d98f64b7907fa85f7174975 (diff) | |
download | mtdot-box-evb-factory-firmware-54270b95f3fe169948ef551c49204defcda4033b.tar.gz mtdot-box-evb-factory-firmware-54270b95f3fe169948ef551c49204defcda4033b.tar.bz2 mtdot-box-evb-factory-firmware-54270b95f3fe169948ef551c49204defcda4033b.zip |
Replace main.cpp
-rw-r--r-- | main.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -41,6 +41,7 @@ #include "ModeSweep.h" #include "ModeDemo.h" #include "ModeConfig.h" +#include "ModeSemtech.h" // misc heders #include "FileName.h" #include <string> @@ -76,6 +77,7 @@ ModeSingle* modeSingle; ModeSweep* modeSweep; ModeDemo* modeDemo; ModeConfig* modeConfig; +ModeSemtech* modeSemtech; // Serial debug port Serial debug(USBTX, USBRX); @@ -111,6 +113,7 @@ int main() { modeSweep = new ModeSweep(lcd, buttons, dot, lora, gps, sensors); modeDemo = new ModeDemo(lcd, buttons, dot, lora, gps, sensors); modeConfig = new ModeConfig(lcd, buttons, dot, lora, gps, sensors); + modeSemtech = new ModeSemtech(lcd, buttons, dot, lora, gps, sensors); osDelay(1000); logInfo("%sGPS detected", gps->gpsDetected() ? "" : "no "); @@ -136,7 +139,8 @@ void mainMenu() { demo = 1, config, single, - sweep + sweep, + semtech } menu_items; std::string menu_strings[] = { @@ -144,7 +148,8 @@ void mainMenu() { "LoRa Demo", "Configuration", "Survey Single", - "Survey Sweep" + "Survey Sweep", + "Semtech" }; std::vector<std::string> items; @@ -152,6 +157,7 @@ void mainMenu() { items.push_back(menu_strings[config]); items.push_back(menu_strings[single]); items.push_back(menu_strings[sweep]); + items.push_back(menu_strings[semtech]); while (true) { product = "MTDOT-BOX/EVB "; @@ -195,8 +201,14 @@ void mainMenu() { if (modeJoin->start()) modeSweep->start(); } + else if (selected == menu_strings[semtech]) { + if(dot->getFrequencyBand()==mDot::FB_868)modeJoin->start(); + modeSemtech->start(); + } mode_selected = false; } } + + |