Sensor Fusion Library
0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
Loading...
Searching...
No Matches
src
build.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015, Freescale Semiconductor, Inc.
3
* Copyright 2016-2017 NXP
4
* All rights reserved.
5
*
6
* SPDX-License-Identifier: BSD-3-Clause
7
*/
8
17
#ifndef BUILD_H
18
#define BUILD_H
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
24
#define THISBUILD 720
25
26
// print debug messages to serial output. Set to 1 to enable, 0 to disable
27
#define ENABLE_DEBUG_LOG 0
28
34
#define NED 0
35
#define ANDROID 1
36
#define WIN8 2
37
#define THISCOORDSYSTEM NED
39
46
//TODO - unhandled exception if trying to not use gyro (and possibly others)
47
#define F_USING_NONE 0x0000
48
#define F_USING_ACCEL 0x0001
49
#define F_USING_MAG 0x0002
50
#define F_USING_GYRO 0x0004
51
#define F_USING_PRESSURE 0x0000
52
#define F_USING_TEMPERATURE 0x0000
53
#define F_ALL_SENSORS 0x001F
60
#define F_1DOF_P_BASIC \
61
0x0000
62
#define F_3DOF_G_BASIC \
63
0x0000
64
#define F_3DOF_B_BASIC \
65
0x0000
66
#define F_3DOF_Y_BASIC \
67
0x0000
68
#define F_6DOF_GB_BASIC \
69
0x0000
70
#define F_6DOF_GY_KALMAN \
71
0x0000
72
#define F_9DOF_GBY_KALMAN \
73
0x4000
75
77
// The Output Data Rates (ODR) are set by the calls to *_Init() for each physical sensor.
78
// If a sensor has a FIFO, then it can be read once/fusion cycle; if not, then read more often
79
#define GYRO_ODR_HZ 400
80
#define ACCEL_ODR_HZ 200
81
#define MAG_ODR_HZ 200
82
#define LOOP_RATE_HZ 40
//adjust according to the size of the FIFOs on sensors. If no FIFO (e.g.
83
//FXOS8700 magnetometer) and don't want to skip any readings then need to read at same rate as ODR.
84
//If FIFO exists or willing to skip readings, then usually set same as FUSION_HZ. See also sensor_fusion_class.h
85
#define FUSION_HZ 40
86
87
// Output data rate parameters
88
#define MAXPACKETRATEHZ 40
//max rate at which data packets can practically be sent (e.g. to Fusion Toolbox)
89
#define RATERESOLUTION 1000
//When throttling back on output rate, this is the resolution in ms
90
91
//Specify which output method(s) to use for sending serial data packets and receiving commands
92
//At least one path is needed if using the Orientation Library with the NXP Sensor Toolbox program.
93
//Neither is needed if using the sensor_fusion_class.* to interface with the Orientation library.
94
#define F_USE_WIRELESS_UART 0x0000
95
#define F_USE_WIRED_UART 0x0000
96
97
//#define INCLUDE_DEBUG_FUNCTIONS // Comment this line to disable the ApplyPerturbation function
98
99
100
#ifdef __cplusplus
101
}
102
#endif
103
104
#endif
// BUILD_H
Generated on Wed Feb 18 2026 09:42:29 for Sensor Fusion Library by
1.9.8