summaryrefslogtreecommitdiff
path: root/Mode/Mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'Mode/Mode.h')
-rw-r--r--Mode/Mode.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Mode/Mode.h b/Mode/Mode.h
index ca8fd19..5d41ed1 100644
--- a/Mode/Mode.h
+++ b/Mode/Mode.h
@@ -6,6 +6,9 @@
#include "mDot.h"
#include "LoRaHandler.h"
#include "GPSPARSER.h"
+#include "ISL29011.h"
+#include "MMA845x.h"
+#include "MPL3115A2.h"
class Mode {
public:
@@ -28,6 +31,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();
@@ -39,6 +49,9 @@ class Mode {
void updateData(DataItem& data, DataType type, bool status);
uint32_t getIndex(DataType type);
+ std::vector<uint8_t> formatSurveyData(DataItem& data);
+ std::vector<uint8_t> formatSensorData(SensorItem& data);
+
DOGS102* _lcd;
ButtonHandler* _buttons;
mDot* _dot;
@@ -56,6 +69,8 @@ class Mode {
LoRaHandler::LoRaPing _ping_result;
uint8_t _state;
bool _send_data;
+ mts::MTSSerial _gpsUART;
+ GPSPARSER _mdot_gps;
};
#endif