summaryrefslogtreecommitdiff
path: root/Layout/LayoutJoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Layout/LayoutJoin.cpp')
-rw-r--r--Layout/LayoutJoin.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Layout/LayoutJoin.cpp b/Layout/LayoutJoin.cpp
index 5ff93d7..83e8551 100644
--- a/Layout/LayoutJoin.cpp
+++ b/Layout/LayoutJoin.cpp
@@ -53,6 +53,7 @@ void LayoutJoin::updateFsb(uint8_t band) {
char buf[8];
size_t size;
+ memset(buf, 0, sizeof(buf));
size = snprintf(buf, sizeof(buf), "%u", band);
writeField(_fFsb, buf, size, true);
}
@@ -65,6 +66,7 @@ void LayoutJoin::updatePower(uint32_t power) {
char buf[16];
size_t size;
+ memset(buf, 0, sizeof(buf));
size = snprintf(buf, sizeof(buf), "%lu", power);
writeField(_fPower, buf, size, true);
}
@@ -73,6 +75,7 @@ void LayoutJoin::updateAttempt(uint32_t attempt) {
char buf[16];
size_t size;
+ memset(buf, 0, sizeof(buf));
size = snprintf(buf, sizeof(buf), "%lu", attempt);
writeField(_fAttempt, buf, size, true);
}
@@ -85,14 +88,10 @@ void LayoutJoin::updateCountdown(uint32_t seconds) {
char buf[16];
size_t size;
+ memset(buf, 0, sizeof(buf));
writeField(_fCountdownLabel, "No Free Channel", true);
- size = snprintf(buf, sizeof(buf), "%lu", seconds);
- writeField(_fPower, buf, size, true);
-}
-
-void LayoutJoin::removeCountdown() {
- removeField(_fCountdownLabel);
- removeField(_fCountdown);
+ size = snprintf(buf, sizeof(buf), "%lu s", seconds);
+ writeField(_fCountdown, buf, size, true);
}
void LayoutJoin::displayCancel(bool display) {