summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-11-18 09:48:05 -0600
committerMike Fiore <mfiore@multitech.com>2015-11-18 09:48:05 -0600
commit0a83aa7c81cb394283b5a327408831f7d62bc336 (patch)
treef01f22cf39f1312231ac42a43e1f436d5fc97d91
parentadc86da249a58d2877034568a8f5b4a1e781530f (diff)
downloadmtdot-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.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 7a47f8d..02cfd5b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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) {