Merge branch 'master' into change-to-sending-expresslrs_RFrates_e-in-sync-packet
[ExpressLRS.git] / src / lib / GSENSOR / gsensor.h
blob90d698145a25f8556b461f0f8551899a7beb0f78
1 #pragma once
3 #include "targets.h"
5 typedef enum
7 GSENSOR_STATUS_FAIL = 0,
8 GSENSOR_STATUS_NORMAL = 1,
9 GSENSOR_STATUS_SUSPEND = 2
10 } Gsensor_Status_t;
12 typedef enum
14 GSENSOR_SYSTEM_STATE_MOVING = 0,
15 GSENSOR_SYSTEM_STATE_QUIET = 1
16 } Gsensor_System_State_t;
18 class Gsensor
20 private:
21 int system_state;
22 bool is_flipped;
23 public:
24 bool init();
25 void handle();
26 bool hasTriggered(unsigned long now);
27 void getGSensorData(float *X_DataOut, float *Y_DataOut, float *Z_DataOut);
28 int getSystemState();
29 bool isFlipped();