pub struct CurrentMode {
pub standard_mode: MavStandardMode,
pub custom_mode: u32,
pub intended_custom_mode: u32,
}Expand description
MAVLink CURRENT_MODE message.
The minimum supported MAVLink version is MAVLink 2.
§Description
Get the current mode. This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). It may be requested using MAV_CMD_REQUEST_MESSAGE. See https://mavlink.io/en/services/standard_modes.html
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
CurrentMode (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§standard_mode: MavStandardModeMAVLink field standard_mode.
Standard mode.
custom_mode: u32MAVLink field custom_mode.
A bitfield for use for autopilot-specific flags
intended_custom_mode: u32MAVLink field intended_custom_mode.
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
Implementations§
Source§impl CurrentMode
impl CurrentMode
Sourcepub const fn spec() -> MessageInfo
pub const fn spec() -> MessageInfo
Returns specification for this message.
Sourcepub const fn message_id() -> MessageId
pub const fn message_id() -> MessageId
Message ID.
Sourcepub const fn min_supported_mavlink_version() -> MavLinkVersion
pub const fn min_supported_mavlink_version() -> MavLinkVersion
Minimum supported MAVLink version for this message.
Trait Implementations§
Source§impl Clone for CurrentMode
impl Clone for CurrentMode
Source§fn clone(&self) -> CurrentMode
fn clone(&self) -> CurrentMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CurrentMode
impl Debug for CurrentMode
Source§impl Default for CurrentMode
impl Default for CurrentMode
Source§impl<'de> Deserialize<'de> for CurrentMode
impl<'de> Deserialize<'de> for CurrentMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<CurrentMode> for Common
impl From<CurrentMode> for Common
Source§fn from(value: CurrentMode) -> Self
fn from(value: CurrentMode) -> Self
Source§impl IntoPayload for CurrentMode
impl IntoPayload for CurrentMode
Source§impl MessageSpec for CurrentMode
impl MessageSpec for CurrentMode
Source§impl MessageSpecStatic for CurrentMode
impl MessageSpecStatic for CurrentMode
Source§fn spec() -> MessageInfo
fn spec() -> MessageInfo
Source§fn message_id() -> MessageId
fn message_id() -> MessageId
ID.Source§fn min_supported_mavlink_version() -> MavLinkVersion
fn min_supported_mavlink_version() -> MavLinkVersion
Source§impl NamedType for CurrentMode
impl NamedType for CurrentMode
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for CurrentMode
impl PartialEq for CurrentMode
Source§impl Serialize for CurrentMode
impl Serialize for CurrentMode
Source§impl TryFrom<&Payload> for CurrentMode
impl TryFrom<&Payload> for CurrentMode
Source§impl Type for CurrentMode
impl Type for CurrentMode
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.