mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 11:08:29 -04:00
AP_BoardConfig: remove ALT_CONFIG param if no alt config is posible
This commit is contained in:
parent
1a6179148b
commit
0e0cc36f8f
@ -293,6 +293,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
||||
AP_SUBGROUPINFO(heater.pi_controller, "IMUHEAT_", 21, AP_BoardConfig, AC_PI),
|
||||
#endif
|
||||
|
||||
#ifdef HAL_PIN_ALT_CONFIG
|
||||
// @Param: ALT_CONFIG
|
||||
// @DisplayName: Alternative HW config
|
||||
// @Description: Select an alternative hardware configuration. A value of zero selects the default configuration for this board. Other values are board specific. Please see the documentation for your board for details on any alternative configuration values that may be available.
|
||||
@ -301,7 +302,8 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
||||
// @User: Advanced
|
||||
// @RebootRequired: True
|
||||
AP_GROUPINFO("ALT_CONFIG", 22, AP_BoardConfig, _alt_config, 0),
|
||||
|
||||
#endif // HAL_PIN_ALT_CONFIG
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
|
@ -124,11 +124,13 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAL_PIN_ALT_CONFIG
|
||||
// get alternative config selection
|
||||
uint8_t get_alt_config(void) {
|
||||
return uint8_t(_alt_config.get());
|
||||
}
|
||||
|
||||
#endif // HAL_PIN_ALT_CONFIG
|
||||
|
||||
enum board_safety_button_option {
|
||||
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF= (1 << 0),
|
||||
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON= (1 << 1),
|
||||
@ -284,7 +286,9 @@ private:
|
||||
|
||||
AP_Int32 _options;
|
||||
|
||||
#ifdef HAL_PIN_ALT_CONFIG
|
||||
AP_Int8 _alt_config;
|
||||
#endif
|
||||
};
|
||||
|
||||
namespace AP {
|
||||
|
Loading…
Reference in New Issue
Block a user