diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.cpp b/libraries/AP_BoardConfig/AP_BoardConfig.cpp index b7a9812f48..ba9ff0eb69 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.cpp +++ b/libraries/AP_BoardConfig/AP_BoardConfig.cpp @@ -270,7 +270,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = { // @Param: OPTIONS // @DisplayName: Board options // @Description: Board specific option flags - // @Bitmask: 0:Enable hardware watchdog, 1:Disable MAVftp + // @Bitmask: 0:Enable hardware watchdog, 1:Disable MAVftp, 2:Enable set of internal parameters // @User: Advanced AP_GROUPINFO("OPTIONS", 19, AP_BoardConfig, _options, HAL_BRD_OPTIONS_DEFAULT), diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.h b/libraries/AP_BoardConfig/AP_BoardConfig.h index fde93ad294..190a2848c6 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.h +++ b/libraries/AP_BoardConfig/AP_BoardConfig.h @@ -165,6 +165,7 @@ public: enum board_options { BOARD_OPTION_WATCHDOG = (1 << 0), DISABLE_FTP = (1<<1), + ALLOW_SET_INTERNAL_PARM = (1<<2), }; // return true if ftp is disabled @@ -177,6 +178,11 @@ public: return _singleton?(_singleton->_options & BOARD_OPTION_WATCHDOG)!=0:HAL_WATCHDOG_ENABLED_DEFAULT; } + // return true if we allow setting of internal parameters (for developers) + static bool allow_set_internal_parameters(void) { + return _singleton?(_singleton->_options & ALLOW_SET_INTERNAL_PARM)!=0:false; + } + // handle press of safety button. Return true if safety state // should be toggled bool safety_button_handle_pressed(uint8_t press_count);