diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-12-01 15:11:03 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-12-01 15:11:03 -0600 |
commit | 4a7ab715f7115460892927b998b2c45828f275d6 (patch) | |
tree | 4b5be7037a4c5b7bd6f54cdb6a0ceb16d498294a /Layout/LayoutSweepProgress.cpp | |
parent | 98e68d87d69d961eb41cf4a5ba21e1b2ac430615 (diff) | |
download | mtdot-box-evb-factory-firmware-4a7ab715f7115460892927b998b2c45828f275d6.tar.gz mtdot-box-evb-factory-firmware-4a7ab715f7115460892927b998b2c45828f275d6.tar.bz2 mtdot-box-evb-factory-firmware-4a7ab715f7115460892927b998b2c45828f275d6.zip |
update progress and pass/fail for sweep
Diffstat (limited to 'Layout/LayoutSweepProgress.cpp')
-rw-r--r-- | Layout/LayoutSweepProgress.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
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) { |