From 4a7f9e8e5bb6377011d63bddfbbd0f5edda8637a Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 6 Jan 2016 15:26:08 -0600 Subject: display countdown over "send" and "interval" labels instead of over "back" label in 868 band and demo mode --- Layout/LayoutDemoSampling.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Layout') diff --git a/Layout/LayoutDemoSampling.cpp b/Layout/LayoutDemoSampling.cpp index 769d6b7..fa37bcb 100644 --- a/Layout/LayoutDemoSampling.cpp +++ b/Layout/LayoutDemoSampling.cpp @@ -53,11 +53,15 @@ void LayoutDemoSampling::updateSw2(std::string sw2) { void LayoutDemoSampling::updateCountdown(uint32_t seconds) { char buf[32]; size_t size; + std::string s; // make sure the string version is used writeField(_fInfo, string("No Free Channel"), true); size = snprintf(buf, sizeof(buf), "%lu s", seconds); - writeField(_fSw2, buf, size, true); + for (int i = 0; i < _fSw1._maxSize - size; i++) + s.append(" "); + s.append(buf, size); + writeField(_fSw1, s, true); } void LayoutDemoSampling::updateInterval(uint32_t seconds) { -- cgit v1.2.3