AP_BoardConfig: Add safety option off
This commit is contained in:
parent
8638446c36
commit
ba49e9e17c
@ -221,7 +221,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
|||||||
// @Param: SAFETYOPTION
|
// @Param: SAFETYOPTION
|
||||||
// @DisplayName: Options for safety button behavior
|
// @DisplayName: Options for safety button behavior
|
||||||
// @Description: This controls the activation of the safety button. It allows you to control if the safety button can be used for safety enable and/or disable, and whether the button is only active when disarmed
|
// @Description: This controls the activation of the safety button. It allows you to control if the safety button can be used for safety enable and/or disable, and whether the button is only active when disarmed
|
||||||
// @Bitmask: 0:ActiveForSafetyEnable,1:ActiveForSafetyDisable,2:ActiveWhenArmed
|
// @Bitmask: 0:ActiveForSafetyEnable,1:ActiveForSafetyDisable,2:ActiveWhenArmed,3:Force safety on when the aircraft disarms
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO("SAFETYOPTION", 13, AP_BoardConfig, state.safety_option, BOARD_SAFETY_OPTION_DEFAULT),
|
AP_GROUPINFO("SAFETYOPTION", 13, AP_BoardConfig, state.safety_option, BOARD_SAFETY_OPTION_DEFAULT),
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,9 +123,10 @@ public:
|
|||||||
|
|
||||||
#if HAL_HAVE_SAFETY_SWITCH
|
#if HAL_HAVE_SAFETY_SWITCH
|
||||||
enum board_safety_button_option {
|
enum board_safety_button_option {
|
||||||
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF=1,
|
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF= (1 << 0),
|
||||||
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON=2,
|
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON= (1 << 1),
|
||||||
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_ARMED=4,
|
BOARD_SAFETY_OPTION_BUTTON_ACTIVE_ARMED= (1 << 2),
|
||||||
|
BOARD_SAFETY_OPTION_SAFETY_ON_DISARM= (1 << 3),
|
||||||
};
|
};
|
||||||
|
|
||||||
// return safety button options. Bits are in enum board_safety_button_option
|
// return safety button options. Bits are in enum board_safety_button_option
|
||||||
|
Loading…
Reference in New Issue
Block a user