summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-07 11:26:27 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-07 11:26:27 -0600
commitd5155b46db41df4bdf9961f40b6fb726887ddca6 (patch)
tree3200ecb10ee13fe23a1496d7f8b20293a8c33dc5
parentbbcc246e8e52b946f7813d0e209ca10161794e00 (diff)
downloadmtdot-box-evb-factory-firmware-d5155b46db41df4bdf9961f40b6fb726887ddca6.tar.gz
mtdot-box-evb-factory-firmware-d5155b46db41df4bdf9961f40b6fb726887ddca6.tar.bz2
mtdot-box-evb-factory-firmware-d5155b46db41df4bdf9961f40b6fb726887ddca6.zip
reset activity LED back to red when exiting to main menu
-rw-r--r--LoRaHandler/LoRaHandler.cpp4
-rw-r--r--LoRaHandler/LoRaHandler.h1
-rw-r--r--main.cpp1
3 files changed, 6 insertions, 0 deletions
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();