Master Thesis
V1.0
Research and Design of Sensor Node for NMSD Treatment
datatypes.h
Go to the documentation of this file.
1
/***************************************************************************/
9
/*
10
* datatypes.h
11
*
12
* Created on: Mar 11, 2020
13
* Author: jonac
14
*/
15
16
#ifndef INC_DATATYPES_H_
17
#define INC_DATATYPES_H_
18
19
#include "stdint.h"
20
21
#define M_PI 3.14159265358979323846
22
23
typedef
enum
app_states
{
24
INIT
,
25
SENSORS_READ
,
26
BATT_READ
,
27
SLEEP
,
28
CALLIBRATE
,
29
SYS_IDLE
30
}
APP_State_t
;
31
32
typedef
struct
33
{
34
// IMU data
35
float
ICM_20948_gyro[3];
36
float
ICM_20948_accel[3];
37
float
ICM_20948_magn[3];
38
float
ICM_20948_euler_angles[3];
39
40
// Bluetooth data
41
uint8_t BLE_euler_angles[
sizeof
(float) * 3];
42
uint8_t BLE_data[
sizeof
(float) * 3 + 5];
43
44
// Calibration
45
float
accelCal[3];
46
float
gyroCal[3];
47
float
magOffset[3];
48
float
magScale[3];
49
50
// Battery
51
uint8_t batt[1];
52
// float ICM_20948_magn_angle[1];
53
54
}
MeasurementData_t
;
55
56
57
#endif
/* INC_DATATYPES_H_ */
MeasurementData_t
Definition:
datatypes.h:32
SENSORS_READ
Definition:
datatypes.h:25
APP_State_t
enum app_states APP_State_t
SLEEP
Definition:
datatypes.h:27
SYS_IDLE
Definition:
datatypes.h:29
app_states
app_states
Definition:
datatypes.h:23
INIT
Definition:
datatypes.h:24
CALLIBRATE
Definition:
datatypes.h:28
BATT_READ
Definition:
datatypes.h:26
inc
datatypes.h
Generated by
1.8.16