From 53c06d0e002016e3a8dd72e325ba902f2eecaf2a Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Fri, 8 Jan 2016 11:06:23 -0600 Subject: display frequency band and sub band correctly even if they change in configuration --- main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index b22def3..b63c61b 100644 --- a/main.cpp +++ b/main.cpp @@ -112,19 +112,16 @@ int main() { void mainMenu() { bool mode_selected = false; std::string selected; - std::string product = "MTDOT-BOX/EVB "; + std::string product; - product += mDot::FrequencyBandStr(dot->getFrequencyBand()).substr(3); - typedef enum { - demo = 2, + demo = 1, config, single, sweep } menu_items; std::string menu_strings[] = { - product, "Select Mode", "LoRa Demo", "Configuration", @@ -139,10 +136,13 @@ void mainMenu() { items.push_back(menu_strings[sweep]); while (true) { + product = "MTDOT-BOX/EVB "; + product += mDot::FrequencyBandStr(dot->getFrequencyBand()).substr(3); + // reset session between modes dot->resetNetworkSession(); lora->resetActivityLed(); - LayoutScrollSelect menu(lcd, items, menu_strings[0], menu_strings[1]); + LayoutScrollSelect menu(lcd, items, product, menu_strings[0]); menu.display(); while (! mode_selected) { -- cgit v1.2.3