Skip to content

Commit

Permalink
AP_Baro: create explicit define for BARO_PROBE_EXT parameter
Browse files Browse the repository at this point in the history
the more-than-trivial #if is needed elsewhere, so create an explicit name for it
  • Loading branch information
peterbarker committed May 7, 2024
1 parent b7541e0 commit 7661f39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_Baro/AP_Baro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions libraries/AP_Baro/AP_Baro_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7661f39

Please sign in to comment.