From d5155b46db41df4bdf9961f40b6fb726887ddca6 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Mon, 7 Dec 2015 11:26:27 -0600 Subject: reset activity LED back to red when exiting to main menu --- LoRaHandler/LoRaHandler.cpp | 4 ++++ LoRaHandler/LoRaHandler.h | 1 + main.cpp | 1 + 3 files changed, 6 insertions(+) diff --git a/LoRaHandler/LoRaHandler.cpp b/LoRaHandler/LoRaHandler.cpp index 94f02a8..b4de8b3 100644 --- a/LoRaHandler/LoRaHandler.cpp +++ b/LoRaHandler/LoRaHandler.cpp @@ -158,3 +158,7 @@ void LoRaHandler::blinker() { _activity_led = !_activity_led; } +void LoRaHandler::resetActivityLed() { + _activity_led = red; +} + diff --git a/LoRaHandler/LoRaHandler.h b/LoRaHandler/LoRaHandler.h index 8a4816a..375c277 100644 --- a/LoRaHandler/LoRaHandler.h +++ b/LoRaHandler/LoRaHandler.h @@ -41,6 +41,7 @@ class LoRaHandler { uint32_t getJoinAttempts(); void resetJoinAttempts(); void blinker(); + void resetActivityLed(); osThreadId _main; Thread _thread; diff --git a/main.cpp b/main.cpp index 5e96f16..d75f821 100644 --- a/main.cpp +++ b/main.cpp @@ -132,6 +132,7 @@ void mainMenu() { while (true) { // reset session between modes dot->resetNetworkSession(); + lora->resetActivityLed(); LayoutScrollSelect menu(lcd, items, menu_strings[0], menu_strings[1]); menu.display(); -- cgit v1.2.3