From 4a7ab715f7115460892927b998b2c45828f275d6 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Tue, 1 Dec 2015 15:11:03 -0600 Subject: update progress and pass/fail for sweep --- Layout/LayoutSweepProgress.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'Layout/LayoutSweepProgress.cpp') diff --git a/Layout/LayoutSweepProgress.cpp b/Layout/LayoutSweepProgress.cpp index 9ec77cc..ec4bbc9 100644 --- a/Layout/LayoutSweepProgress.cpp +++ b/Layout/LayoutSweepProgress.cpp @@ -2,12 +2,10 @@ LayoutSweepProgress::LayoutSweepProgress(DOGS102* lcd) : Layout(lcd), - _lSlash(8, 1, "/"), - _lMsg1(5, 2, "Sweep"), + _lMsg1(6, 2, "Sweep"), _lMsg2(7, 3, "in"), _lMsg3(4, 4, "Progress"), - _fComplete(6, 1, 2), - _fTotal(9, 1, 2), + _fProgress(6, 1, 5), _fCountdownLabel(0, 6, 17), _fCountdown(0, 7, 9) {} @@ -18,7 +16,6 @@ void LayoutSweepProgress::display() { clear(); startUpdate(); - writeLabel(_lSlash); writeLabel(_lMsg1); writeLabel(_lMsg2); writeLabel(_lMsg3); @@ -31,12 +28,8 @@ void LayoutSweepProgress::updateProgress(uint8_t complete, uint8_t total) { size_t size; memset(buf, 0, sizeof(buf)); - size = snprintf(buf, sizeof(buf), "%2u", complete); - writeField(_fComplete, buf, size, true); - - memset(buf, 0, sizeof(buf)); - size = snprintf(buf, sizeof(buf), "%u", total); - writeField(_fTotal, buf, size, true); + size = snprintf(buf, sizeof(buf), "%u/%u", complete, total); + writeField(_fProgress, buf, size, true); } void LayoutSweepProgress::updateCountdown(uint32_t seconds) { -- cgit v1.2.3