summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Klaassen <ryan.klaassen@multitech.com>2016-08-08 12:53:36 -0500
committerRyan Klaassen <ryan.klaassen@multitech.com>2016-08-08 12:53:36 -0500
commit2d07be2d5f27e9b4cda490035dc9daa1538aefd1 (patch)
tree71b19b7cf1315be6a3caaea6da25a60ac45d16e8
parenteae9590d687a9a748d8a47eee28e0ccec5f85ede (diff)
downloadmtdot-box-evb-factory-firmware-2d07be2d5f27e9b4cda490035dc9daa1538aefd1.tar.gz
mtdot-box-evb-factory-firmware-2d07be2d5f27e9b4cda490035dc9daa1538aefd1.tar.bz2
mtdot-box-evb-factory-firmware-2d07be2d5f27e9b4cda490035dc9daa1538aefd1.zip
Replace main.cpp
-rw-r--r--main.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 9166354..3a35c8f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -41,6 +41,7 @@
#include "ModeSweep.h"
#include "ModeDemo.h"
#include "ModeConfig.h"
+#include "ModeData.h"
// misc heders
#include "FileName.h"
#include <string>
@@ -76,6 +77,7 @@ ModeSingle* modeSingle;
ModeSweep* modeSweep;
ModeDemo* modeDemo;
ModeConfig* modeConfig;
+ModeData* modeData;
// 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);
+ modeData = new ModeData(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,
+ data
} menu_items;
std::string menu_strings[] = {
@@ -144,7 +148,8 @@ void mainMenu() {
"LoRa Demo",
"Configuration",
"Survey Single",
- "Survey Sweep"
+ "Survey Sweep",
+ "Survey Data"
};
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[data]);
while (true) {
product = "MTDOT-BOX/EVB ";
@@ -194,9 +200,12 @@ void mainMenu() {
} else if (selected == menu_strings[sweep]) {
if (modeJoin->start())
modeSweep->start();
- }
+ }else if (selected == menu_strings[data]) {
+ modeData->start();
+ }
mode_selected = false;
}
}
+