optimise mavlink SS packet size (#3029)
[ExpressLRS.git] / src / lib / GSENSOR / gsensor.h
bloba98c5c5b4d78f4700bf5082c37b480617408b89a
1 #pragma once
3 typedef enum
5 GSENSOR_STATUS_FAIL = 0,
6 GSENSOR_STATUS_NORMAL = 1,
7 GSENSOR_STATUS_SUSPEND = 2
8 } Gsensor_Status_t;
10 typedef enum
12 GSENSOR_SYSTEM_STATE_MOVING = 0,
13 GSENSOR_SYSTEM_STATE_QUIET = 1
14 } Gsensor_System_State_t;
16 class Gsensor
18 private:
19 int system_state;
20 bool is_flipped;
21 public:
22 bool init();
23 void handle();
24 bool hasTriggered(unsigned long now);
25 void getGSensorData(float *X_DataOut, float *Y_DataOut, float *Z_DataOut);
26 int getSystemState();
27 bool isFlipped();