diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 17 |
1 files changed, 15 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> @@ -79,6 +80,7 @@ ModeSingle* modeSingle; ModeSweep* modeSweep; ModeDemo* modeDemo; ModeConfig* modeConfig; +ModeSemtech* modeSemtech; // Serial debug port Serial debug(USBTX, USBRX); @@ -114,11 +116,13 @@ int main() { MTSLog::setLogLevel(MTSLog::TRACE_LEVEL); + modeJoin = new ModeJoin(lcd, buttons, dot, loraHandler, gps, sensors); modeSingle = new ModeSingle(lcd, buttons, dot, loraHandler, gps, sensors); modeSweep = new ModeSweep(lcd, buttons, dot, loraHandler, gps, sensors); modeDemo = new ModeDemo(lcd, buttons, dot, loraHandler, gps, sensors); modeConfig = new ModeConfig(lcd, buttons, dot, loraHandler, gps, sensors); + modeSemtech = new ModeSemtech(lcd, buttons, dot, loraHandler, gps, sensors); osDelay(1000); logInfo("%sGPS detected", gps->gpsDetected() ? "" : "no "); @@ -144,7 +148,8 @@ void mainMenu() { demo = 1, config, single, - sweep + sweep, + semtech } menu_items; std::string menu_strings[] = { @@ -152,7 +157,8 @@ void mainMenu() { "LoRa Demo", "Configuration", "Survey Single", - "Survey Sweep" + "Survey Sweep", + "Semtech" }; std::vector<std::string> items; @@ -160,6 +166,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 "; @@ -203,8 +210,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; } } + + |