MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
types.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <stdint.h>
9 
13 typedef struct {
14  float x;
15  float y;
16  float z;
18 
22 typedef struct {
23  uint16_t voltage;
24  uint8_t charge;
26 
30 typedef struct {
31  uint16_t clear;
32  uint16_t red;
33  uint16_t green;
34  uint16_t blue;
36 
40 typedef struct {
41  float heading;
42  float pitch;
43  float roll;
44  float yaw;
46 
50 typedef struct {
51  float w;
52  float x;
53  float y;
54  float z;
56 
60 typedef struct {
61  float x;
62  float y;
63  float z;
64  uint8_t accuracy;
66 
70 typedef struct {
71  uint16_t length;
72  uint8_t assert_en;
74 
79 typedef enum {
80  MBL_MW_SENSOR_ORIENTATION_FACE_UP_PORTRAIT_UPRIGHT,
81  MBL_MW_SENSOR_ORIENTATION_FACE_UP_PORTRAIT_UPSIDE_DOWN,
82  MBL_MW_SENSOR_ORIENTATION_FACE_UP_LANDSCAPE_LEFT,
83  MBL_MW_SENSOR_ORIENTATION_FACE_UP_LANDSCAPE_RIGHT,
84  MBL_MW_SENSOR_ORIENTATION_FACE_DOWN_PORTRAIT_UPRIGHT,
85  MBL_MW_SENSOR_ORIENTATION_FACE_DOWN_PORTRAIT_UPSIDE_DOWN,
86  MBL_MW_SENSOR_ORIENTATION_FACE_DOWN_LANDSCAPE_LEFT,
87  MBL_MW_SENSOR_ORIENTATION_FACE_DOWN_LANDSCAPE_RIGHT
89 
93 typedef struct {
94  int64_t epoch;
95  uint8_t reset_uid;
97 
101 typedef struct {
102  uint8_t accelrometer;
103  uint8_t gyroscope;
104  uint8_t magnetometer;
106 
110 typedef struct {
111  uint8_t type;
112  uint8_t sign;
113 } MblMwBoschTap;
Tuple holding battery state information.
Definition: types.h:22
uint16_t voltage
Voltage level, in mV.
Definition: types.h:23
uint8_t charge
Percent charged, between [0, 100] percent.
Definition: types.h:24
Wrapper class encapsulating responses from the Bosch tap detector.
Definition: types.h:110
uint8_t type
1 if double tap, 2 if single tap
Definition: types.h:111
uint8_t sign
0 if positive, 1 if negative
Definition: types.h:112
Sensor fusion calibration state.
Definition: types.h:101
Tuple combining float data on a 3D cartesian coordinate system.
Definition: types.h:13
float x
Data corresponding to the x-axis.
Definition: types.h:14
float z
Data corresponding to the z-axis.
Definition: types.h:16
float y
Data corresponding to the y-axis.
Definition: types.h:15
Variant of the MblMwCartesianFloat struct that also reports data accuracy.
Definition: types.h:60
4-element float vector holding Euler angles, all values are in degrees
Definition: types.h:40
Internal clock for logger timestamps.
Definition: types.h:93
Internal stack overflow state.
Definition: types.h:70
4-element float vector containing a normalized quaternion value
Definition: types.h:50
Tuple wrapping ADC data from the TCS34725 color detector.
Definition: types.h:30
uint16_t blue
ADC value from a blue filtered diode.
Definition: types.h:34
uint16_t green
ADC value from a green filtered diode.
Definition: types.h:33
uint16_t clear
ADC value from an unfiltered diode.
Definition: types.h:31
uint16_t red
ADC value from a red filtered diode.
Definition: types.h:32
MblMwSensorOrientation
Enumeration of sensor orientations.
Definition: types.h:79