diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-11-18 09:48:05 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-11-18 09:48:05 -0600 |
commit | 0a83aa7c81cb394283b5a327408831f7d62bc336 (patch) | |
tree | f01f22cf39f1312231ac42a43e1f436d5fc97d91 | |
parent | adc86da249a58d2877034568a8f5b4a1e781530f (diff) | |
download | mtdot-box-evb-factory-firmware-0a83aa7c81cb394283b5a327408831f7d62bc336.tar.gz mtdot-box-evb-factory-firmware-0a83aa7c81cb394283b5a327408831f7d62bc336.tar.bz2 mtdot-box-evb-factory-firmware-0a83aa7c81cb394283b5a327408831f7d62bc336.zip |
fix datarate display on join, clear signals for main thread after changing modes
-rw-r--r-- | main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -147,6 +147,9 @@ void join() { ButtonHandler::ButtonEvent ev; LoRaHandler::LoRaStatus status; + // clear any stale signals + osSignalClear(main_id, buttonSignal | loraSignal); + // start of temporary stuff! if (dot->getFrequencyBand() == mDot::FB_915) dot->setFrequencySubBand(mDot::FSB_7); @@ -177,7 +180,8 @@ void join() { } if (band == mDot::FB_915) lj.updateFsb(dot->getFrequencySubBand()); - lj.updateRate(dot->DataRateStr(rate)); + // mDot::DataRateStr returns format SF_XX - we only want to display the XX part + lj.updateRate(dot->DataRateStr(rate).substr(3)); lj.updatePower(power); if (! lora) { @@ -234,8 +238,11 @@ void join() { void configuration() { LayoutConfig lc(lcd); - lc.display(); + // clear any stale signals + osSignalClear(main_id, buttonSignal | loraSignal); + + lc.display(); logInfo("config mode"); while (true) { |