summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-11-18 09:35:43 -0600
committerMike Fiore <mfiore@multitech.com>2015-11-18 09:35:43 -0600
commitadc86da249a58d2877034568a8f5b4a1e781530f (patch)
tree09627ca398fe52883b81d48ff571f8015e84036f /main.cpp
parent6e325937c6c144b43d442bc34b936a8cb432eae7 (diff)
downloadmtdot-box-evb-factory-firmware-adc86da249a58d2877034568a8f5b4a1e781530f.tar.gz
mtdot-box-evb-factory-firmware-adc86da249a58d2877034568a8f5b4a1e781530f.tar.bz2
mtdot-box-evb-factory-firmware-adc86da249a58d2877034568a8f5b4a1e781530f.zip
display current join attempt when joining
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 63d0471..7a47f8d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -138,6 +138,7 @@ void mainMenu() {
}
void join() {
+ uint32_t attempts = 1;
uint32_t next_tx;
uint8_t rate;
uint8_t power;
@@ -192,12 +193,13 @@ void join() {
if (next_tx) {
lj.updateCountdown(next_tx * 1000);
} else {
+ lj.updateAttempt(attempts++);
lj.updateStatus("Joining...");
if (! lora->join())
logError("cannot join - LoRa layer busy");
}
- osEvent e = Thread::signal_wait(0, 250);
+ osEvent e = Thread::signal_wait(0);
if (e.status == osEventSignal) {
if (e.value.signals & buttonSignal) {
ev = buttons->getButtonEvent();