From 4c64b9522f9bb9815b089ab98cf2f33f11bded52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 10 May 2023 10:47:39 +0200 Subject: [PATCH] development: changes to standard flight modes (#1915) - reduces the mode name to 35 - removes 'base_mode', as this contains dynamic bits, like MAV_MODE_FLAG_SAFETY_ARMED - adds properties to modes: - whether a mode is flagged as 'advanced', so a UI can hide it - adds a user intended mode field. This is generally equal to custom_mode, but might be different in a failsafe condition --- message_definitions/v1.0/development.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index 7e1c76c3da..2f037d9819 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -108,6 +108,21 @@ + + Mode properties. + + + If set, this mode is an advanced mode. + For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not. + A GCS can optionally use this flag to configure the UI for its intended users. + + + + If set, this mode should not be added to the list of selectable modes. + The mode might still be selected by the FC directly (for example as part of a failsafe). + + + @@ -294,9 +309,9 @@ The total number of available modes for the current vehicle type. The current mode index within number_modes, indexed from 1. Standard mode. - System mode bitmap. A bitfield for use for autopilot-specific flags - Name of custom mode, with null termination character. Should be omitted for standard modes. + Mode properties. + Name of custom mode, with null termination character. Should be omitted for standard modes. Get the current mode. @@ -304,8 +319,8 @@ It may be requested using MAV_CMD_REQUEST_MESSAGE. Standard mode. - System mode bitmap. A bitfield for use for autopilot-specific flags + The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.