AP_Baro: create explicit define for BARO_PROBE_EXT parameter

the more-than-trivial #if is needed elsewhere, so create an explicit name for it
This commit is contained in:
Peter Barker 2024-05-08 09:51:26 +10:00 committed by Andrew Tridgell
parent 41d0a79ec0
commit 972872d09f
2 changed files with 5 additions and 1 deletions

View File

@ -173,7 +173,7 @@ const AP_Param::GroupInfo AP_Baro::var_info[] = {
// @Increment: 1
AP_GROUPINFO("_FLTR_RNG", 13, AP_Baro, _filter_range, HAL_BARO_FILTER_DEFAULT),
#if AP_BARO_PROBE_EXTERNAL_I2C_BUSES || AP_BARO_MSP_ENABLED
#if AP_BARO_PROBE_EXT_PARAMETER_ENABLED
// @Param: _PROBE_EXT
// @DisplayName: External barometers to probe
// @Description: This sets which types of external i2c barometer to look for. It is a bitmask of barometer types. The I2C buses to probe is based on BARO_EXT_BUS. If BARO_EXT_BUS is -1 then it will probe all external buses, otherwise it will probe just the bus number given in BARO_EXT_BUS.

View File

@ -89,3 +89,7 @@
#ifndef AP_BARO_PROBE_EXTERNAL_I2C_BUSES
#define AP_BARO_PROBE_EXTERNAL_I2C_BUSES 1
#endif
#ifndef AP_BARO_PROBE_EXT_PARAMETER_ENABLED
#define AP_BARO_PROBE_EXT_PARAMETER_ENABLED AP_BARO_PROBE_EXTERNAL_I2C_BUSES || AP_BARO_MSP_ENABLED
#endif