summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-11-23 15:09:44 -0600
committerMike Fiore <mfiore@multitech.com>2015-11-23 15:09:44 -0600
commit8f96af37d65f62e0ee087b45905d5bb4e3fa7776 (patch)
tree9bf123fa8b0caa233ebe3dd3e42cb7fbe568024d
parentcf6730142a9d6783abb950979d5a60aea3eb9451 (diff)
downloadmtdot-box-evb-factory-firmware-8f96af37d65f62e0ee087b45905d5bb4e3fa7776.tar.gz
mtdot-box-evb-factory-firmware-8f96af37d65f62e0ee087b45905d5bb4e3fa7776.tar.bz2
mtdot-box-evb-factory-firmware-8f96af37d65f62e0ee087b45905d5bb4e3fa7776.zip
stub out functions & struct for formatting data packets for both survey and demo modes
-rw-r--r--Mode/Mode.cpp12
-rw-r--r--Mode/Mode.h14
-rw-r--r--main.cpp5
3 files changed, 26 insertions, 5 deletions
diff --git a/Mode/Mode.cpp b/Mode/Mode.cpp
index ba60c01..5ae3528 100644
--- a/Mode/Mode.cpp
+++ b/Mode/Mode.cpp
@@ -127,3 +127,15 @@ void Mode::updateData(DataItem& data, DataType type, bool status) {
data.power = _power;
}
+std::vector<uint8_t> Mode::formatSurveyData(DataItem& data) {
+ std::vector<uint8_t> send_data;
+
+ return send_data;
+}
+
+std::vector<uint8_t> Mode::formatSensorData(SensorItem& data) {
+ std::vector<uint8_t> send_data;
+
+ return send_data;
+}
+
diff --git a/Mode/Mode.h b/Mode/Mode.h
index 8a4f030..96c27b1 100644
--- a/Mode/Mode.h
+++ b/Mode/Mode.h
@@ -6,6 +6,10 @@
#include "mDot.h"
#include "LoRaHandler.h"
#include "GPSPARSER.h"
+#include "ISL29011.h"
+#include "MMA845x.h"
+#include "MPL3115A2.h"
+#include "GPSPARSER.h"
class Mode {
public:
@@ -28,6 +32,13 @@ class Mode {
uint32_t power;
} DataItem;
+ typedef struct {
+ MMA845x_DATA accel_data;
+ MPL3115A2_DATA baro_data;
+ uint16_t lux_data;
+ uint32_t pressure;
+ } SensorItem;
+
Mode(DOGS102* lcd, ButtonHandler* buttons, mDot* dot, LoRaHandler* lora);
~Mode();
@@ -38,6 +49,9 @@ class Mode {
bool appendDataFile(const DataItem& data);
void updateData(DataItem& data, DataType type, bool status);
+ std::vector<uint8_t> formatSurveyData(DataItem& data);
+ std::vector<uint8_t> formatSensorData(SensorItem& data);
+
DOGS102* _lcd;
ButtonHandler* _buttons;
mDot* _dot;
diff --git a/main.cpp b/main.cpp
index c63f922..cbc7e13 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,11 +4,6 @@
// MTS headers
#include "mDot.h"
#include "MTSLog.h"
-// sensor headers
-#include "ISL29011.h"
-#include "MMA845x.h"
-#include "MPL3115A2.h"
-#include "GPSPARSER.h"
// display headers
#include "DOGS102.h"
#include "NCP5623B.h"