summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-04 10:43:41 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-04 10:43:41 -0600
commit2fa742c2c10c1d495a4428d94419e33bcf402199 (patch)
tree7963884fedf92537a2cca1d428e769f810ccad31
parent7f56fcdc391d449c749ff794518b7fff328d996a (diff)
downloadmtdot-box-evb-factory-firmware-2fa742c2c10c1d495a4428d94419e33bcf402199.tar.gz
mtdot-box-evb-factory-firmware-2fa742c2c10c1d495a4428d94419e33bcf402199.tar.bz2
mtdot-box-evb-factory-firmware-2fa742c2c10c1d495a4428d94419e33bcf402199.zip
some tweaks to display in Demo Mode
-rw-r--r--Layout/LayoutDemoSampling.cpp2
-rw-r--r--Mode/ModeDemo.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/Layout/LayoutDemoSampling.cpp b/Layout/LayoutDemoSampling.cpp
index 08d74ff..14a4cf7 100644
--- a/Layout/LayoutDemoSampling.cpp
+++ b/Layout/LayoutDemoSampling.cpp
@@ -58,7 +58,7 @@ void LayoutDemoSampling::updateCountdown(uint32_t seconds) {
// for some reason, there's a % character that gets displayed in the last column
// add the extra spaces to wipe it out
writeField(_fInfo, "No Free Channel ", true);
- size = snprintf(buf, sizeof(buf), "%lu s", seconds);
+ size = snprintf(buf, sizeof(buf), "%lu s ", seconds);
writeField(_fSw2, buf, size, true);
}
diff --git a/Mode/ModeDemo.cpp b/Mode/ModeDemo.cpp
index 80d202c..333bc54 100644
--- a/Mode/ModeDemo.cpp
+++ b/Mode/ModeDemo.cpp
@@ -91,6 +91,7 @@ bool ModeDemo::start() {
case sampling:
if (_mode == trigger) {
_sam.updateSw2("Send");
+ _sam.updateInfo(" ");
} else {
_sam.updateSw1("Interval");
_sam.updateInterval(_intervals[_interval]);
@@ -110,6 +111,7 @@ bool ModeDemo::start() {
case sampling:
if (_mode == trigger) {
_sam.updateSw2("Send");
+ _sam.updateInfo(" ");
} else {
_sam.updateSw1("Interval");
_sam.updateInterval(_intervals[_interval]);
@@ -144,20 +146,17 @@ bool ModeDemo::start() {
}
if (send) {
std::vector<uint8_t> s_data = formatSensorData(_data);
- logInfo("sending data %s %d", _dot->DataRateStr(_data_rate).c_str(), _power);
+ logInfo("sending data %s %d", _dot->DataRateStr(_dot->getTxDataRate()).c_str(), _dot->getTxPower());
_sam.updateInfo("Sending...");
_sam.updateSw1(" ");
_sam.updateSw2(" ");
send = false;
- _dot->setTxDataRate(_data_rate);
- _dot->setTxPower(_power);
// we don't care if the server actually gets this packet or not
// we won't retry anyway
_dot->setAck(0);
_dot->setTxWait(false);
_lora->send(s_data);
osDelay(500);
- _sam.updateInfo(" ");
}
}
}