Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Baro/AP_Baro_config.h
9742 views
1
#pragma once
2
3
#include <AP_HAL/AP_HAL_Boards.h>
4
#include <AP_MSP/msp.h>
5
#include <AP_ExternalAHRS/AP_ExternalAHRS.h>
6
#include <AP_Airspeed/AP_Airspeed_config.h>
7
8
#ifndef HAL_BARO_WIND_COMP_ENABLED
9
#define HAL_BARO_WIND_COMP_ENABLED 1
10
#endif
11
12
#ifndef AP_BARO_ENABLED
13
#define AP_BARO_ENABLED 1
14
#endif
15
16
// backend support:
17
#ifndef AP_BARO_BACKEND_DEFAULT_ENABLED
18
#define AP_BARO_BACKEND_DEFAULT_ENABLED 1
19
#endif
20
21
#ifndef AP_BARO_BMP085_ENABLED
22
#define AP_BARO_BMP085_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
23
#endif
24
25
#ifndef AP_BARO_BMP280_ENABLED
26
#define AP_BARO_BMP280_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
27
#endif
28
29
#ifndef AP_BARO_BMP388_ENABLED
30
#define AP_BARO_BMP388_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
31
#endif
32
33
#ifndef AP_BARO_BMP581_ENABLED
34
#define AP_BARO_BMP581_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
35
#endif
36
37
#ifndef AP_BARO_DPS280_ENABLED
38
#define AP_BARO_DPS280_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
39
#endif
40
41
#ifndef AP_BARO_DUMMY_ENABLED
42
#define AP_BARO_DUMMY_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
43
#endif
44
45
#ifndef AP_BARO_EXTERNALAHRS_ENABLED
46
#define AP_BARO_EXTERNALAHRS_ENABLED AP_EXTERNAL_AHRS_ENABLED
47
#endif
48
49
#ifndef AP_BARO_FBM320_ENABLED
50
#define AP_BARO_FBM320_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
51
#endif
52
53
#ifndef AP_BARO_ICM20789_ENABLED
54
#define AP_BARO_ICM20789_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
55
#endif
56
57
#ifndef AP_BARO_ICP101XX_ENABLED
58
#define AP_BARO_ICP101XX_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
59
#endif
60
61
#ifndef AP_BARO_ICP201XX_ENABLED
62
#define AP_BARO_ICP201XX_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
63
#endif
64
65
#ifndef AP_BARO_KELLERLD_ENABLED
66
#define AP_BARO_KELLERLD_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
67
#endif
68
69
#ifndef AP_BARO_LPS2XH_ENABLED
70
#define AP_BARO_LPS2XH_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
71
#endif
72
73
#ifndef AP_BARO_MS5611_ENABLED
74
#define AP_BARO_MS5611_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
75
#endif // AP_BARO_MS5611_ENABLED
76
77
// we have an option to treat a 5611 configuration as if it were a
78
// 5607 configuration as the parts are used interchangeably by some
79
// vendors. hwdefs may get awkward if we don't default 5607 this way:
80
#ifndef AP_BARO_MS5607_ENABLED
81
#define AP_BARO_MS5607_ENABLED AP_BARO_MS5611_ENABLED
82
#endif // AP_BARO_MS5607_ENABLED
83
84
#ifndef AP_BARO_MS5637_ENABLED
85
#define AP_BARO_MS5637_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
86
#endif // AP_BARO_MS5637_ENABLED
87
88
#ifndef AP_BARO_MS5837_ENABLED
89
#define AP_BARO_MS5837_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
90
#endif // AP_BARO_MS5837_ENABLED
91
92
#define AP_BARO_MS56XX_ENABLED (AP_BARO_MS5607_ENABLED || AP_BARO_MS5611_ENABLED || AP_BARO_MS5637_ENABLED || AP_BARO_MS5837_ENABLED)
93
94
#ifndef AP_BARO_MSP_ENABLED
95
#define AP_BARO_MSP_ENABLED HAL_MSP_SENSORS_ENABLED
96
#endif
97
98
#ifndef AP_SIM_BARO_ENABLED
99
#define AP_SIM_BARO_ENABLED AP_SIM_ENABLED
100
#endif
101
102
#ifndef AP_BARO_SPL06_ENABLED
103
#define AP_BARO_SPL06_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED
104
#endif
105
106
#ifndef AP_BARO_DRONECAN_ENABLED
107
#define AP_BARO_DRONECAN_ENABLED (AP_BARO_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS)
108
#endif
109
110
#ifndef AP_BARO_AUAV_ENABLED
111
#define AP_BARO_AUAV_ENABLED AP_BARO_BACKEND_DEFAULT_ENABLED && AP_AIRSPEED_AUAV_ENABLED
112
#endif
113
114
#ifndef AP_BARO_PROBE_EXTERNAL_I2C_BUSES
115
#define AP_BARO_PROBE_EXTERNAL_I2C_BUSES 1
116
#endif
117
118
#ifndef AP_BARO_PROBE_EXT_PARAMETER_ENABLED
119
#define AP_BARO_PROBE_EXT_PARAMETER_ENABLED AP_BARO_PROBE_EXTERNAL_I2C_BUSES || AP_BARO_MSP_ENABLED
120
#endif
121
122
#ifndef AP_BARO_1976_STANDARD_ATMOSPHERE_ENABLED
123
// default to using the extended functions when doing double precision EKF (which implies more flash space and faster MCU)
124
// this allows for using the simple model with the --ekf-single configure option
125
#define AP_BARO_1976_STANDARD_ATMOSPHERE_ENABLED HAL_WITH_EKF_DOUBLE || AP_SIM_ENABLED
126
#endif
127
128
#ifndef AP_BARO_THST_COMP_ENABLED
129
#define AP_BARO_THST_COMP_ENABLED 0
130
#endif
131
132