mirror of https://github.com/ArduPilot/ardupilot
AP_BoardConfig: add Board option to disable MAVftp in low mem bds/apps
This commit is contained in:
parent
9c74474196
commit
6fe5ed36ce
|
@ -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
|
||||
// @Bitmask: 0:Enable hardware watchdog, 1:Disable MAVftp
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("OPTIONS", 19, AP_BoardConfig, _options, HAL_BRD_OPTIONS_DEFAULT),
|
||||
|
||||
|
|
|
@ -164,8 +164,14 @@ public:
|
|||
|
||||
enum board_options {
|
||||
BOARD_OPTION_WATCHDOG = (1 << 0),
|
||||
DISABLE_FTP = (1<<1),
|
||||
};
|
||||
|
||||
// return true if ftp is disabled
|
||||
static bool ftp_disabled(void) {
|
||||
return _singleton?(_singleton->_options & DISABLE_FTP)!=0:1;
|
||||
}
|
||||
|
||||
// return true if watchdog enabled
|
||||
static bool watchdog_enabled(void) {
|
||||
return _singleton?(_singleton->_options & BOARD_OPTION_WATCHDOG)!=0:HAL_WATCHDOG_ENABLED_DEFAULT;
|
||||
|
|
Loading…
Reference in New Issue