diff options
-rw-r--r-- | LoRaHandler/LoRaHandler.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/LoRaHandler/LoRaHandler.cpp b/LoRaHandler/LoRaHandler.cpp index de9f0b1..d52ca54 100644 --- a/LoRaHandler/LoRaHandler.cpp +++ b/LoRaHandler/LoRaHandler.cpp @@ -87,12 +87,16 @@ void l_worker(void const* argument) { l->_mutex.unlock(); if (ret == mDot::MDOT_OK) { l->_status = LoRaHandler::join_success; + osSignalSet(l->_main, loraSignal); + l->_tick.detach(); + l->_activity_led = LoRaHandler::green; } else { l->_status = LoRaHandler::join_failure; + osSignalSet(l->_main, loraSignal); + l->_tick.detach(); + l->_activity_led = LoRaHandler::red; } - osSignalSet(l->_main, loraSignal); - l->_tick.detach(); - l->_activity_led = LoRaHandler::green; + break; default: @@ -180,3 +184,4 @@ void LoRaHandler::resetActivityLed() { _activity_led = red; } + |