summaryrefslogtreecommitdiff
path: root/Layout/LayoutSurveyProgress.cpp
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-11-20 08:13:35 -0600
committerMike Fiore <mfiore@multitech.com>2015-11-20 08:13:35 -0600
commit674cdb5c13bad3598381b81d843b5aeee5798d1f (patch)
tree1d18d592b5df2513036838bc94530648ad36631e /Layout/LayoutSurveyProgress.cpp
parent11412cbac7021dd8aee14ac4f1dc25994c9ab45b (diff)
downloadmtdot-box-evb-factory-firmware-674cdb5c13bad3598381b81d843b5aeee5798d1f.tar.gz
mtdot-box-evb-factory-firmware-674cdb5c13bad3598381b81d843b5aeee5798d1f.tar.bz2
mtdot-box-evb-factory-firmware-674cdb5c13bad3598381b81d843b5aeee5798d1f.zip
implement basic single survey mode - still needs sending data packet and data survey file
Diffstat (limited to 'Layout/LayoutSurveyProgress.cpp')
-rw-r--r--Layout/LayoutSurveyProgress.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/Layout/LayoutSurveyProgress.cpp b/Layout/LayoutSurveyProgress.cpp
new file mode 100644
index 0000000..c0434f7
--- /dev/null
+++ b/Layout/LayoutSurveyProgress.cpp
@@ -0,0 +1,34 @@
+#include "LayoutSurveyProgress.h"
+
+LayoutSurveyProgress::LayoutSurveyProgress(DOGS102* lcd)
+ : Layout(lcd),
+ _lMsg1(5, 2, "Survey"),
+ _lMsg2(7, 3, "in"),
+ _lMsg3(4, 4, "Progress"),
+ _fCountdownLabel(0, 6, 17),
+ _fCountdown(0, 7, 9)
+{}
+
+LayoutSurveyProgress::~LayoutSurveyProgress() {}
+
+void LayoutSurveyProgress::display() {
+ clear();
+ startUpdate();
+
+ writeLabel(_lMsg1);
+ writeLabel(_lMsg2);
+ writeLabel(_lMsg3);
+
+ endUpdate();
+}
+
+void LayoutSurveyProgress::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 s", seconds);
+ writeField(_fCountdown, buf, size, true);
+}
+