summaryrefslogtreecommitdiff
path: root/Layout/LayoutSweepProgress.cpp
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-11 09:47:25 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-11 09:47:25 -0600
commit2780dbb79e01d916e48452abf7d0e2b1b85dc643 (patch)
treebc9a4d964d8be761e7ded4b47257d538561e12ea /Layout/LayoutSweepProgress.cpp
parent8f3d5d0a8e9539ebcc203f5dd7c3661cad101a35 (diff)
downloadmtdot-box-evb-factory-firmware-2780dbb79e01d916e48452abf7d0e2b1b85dc643.tar.gz
mtdot-box-evb-factory-firmware-2780dbb79e01d916e48452abf7d0e2b1b85dc643.tar.bz2
mtdot-box-evb-factory-firmware-2780dbb79e01d916e48452abf7d0e2b1b85dc643.zip
fix bug in layout where a character from last field could be displayed in new field, remove lots of memset calls
Diffstat (limited to 'Layout/LayoutSweepProgress.cpp')
-rw-r--r--Layout/LayoutSweepProgress.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Layout/LayoutSweepProgress.cpp b/Layout/LayoutSweepProgress.cpp
index ec4bbc9..36debef 100644
--- a/Layout/LayoutSweepProgress.cpp
+++ b/Layout/LayoutSweepProgress.cpp
@@ -27,7 +27,6 @@ void LayoutSweepProgress::updateProgress(uint8_t complete, uint8_t total) {
char buf[8];
size_t size;
- memset(buf, 0, sizeof(buf));
size = snprintf(buf, sizeof(buf), "%u/%u", complete, total);
writeField(_fProgress, buf, size, true);
}
@@ -36,10 +35,7 @@ void LayoutSweepProgress::updateCountdown(uint32_t seconds) {
char buf[16];
size_t size;
- memset(buf, 0, sizeof(buf));
- // for some reason, there's a % character that gets displayed in the last column
- // add the extra spaces to wipe it out
- writeField(_fCountdownLabel, "No Free Channel ", true);
+ writeField(_fCountdownLabel, "No Free Channel", true);
size = snprintf(buf, sizeof(buf), "%lu s", seconds);
writeField(_fCountdown, buf, size, true);
}