pub struct CommandInt {}
Expand description
MAVLink COMMAND_INT
message.
The minimum supported MAVLink version is MAVLink 1
.
§Description
Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component’s current latitude, yaw rather than a specific value). The command microservice is documented at https://mavlink.io/en/services/command.html
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload>
for
CommandInt
(encoding) and [IntoPayload
] (decoding) traits.
These traits are implemented by Message
proc macro.
Fields§
§target_system: u8
MAVLink field target_system
.
System ID
target_component: u8
MAVLink field target_component
.
Component ID
frame: MavFrame
MAVLink field frame
.
The coordinate system of the COMMAND.
command: MavCmd
MAVLink field command
.
The scheduled action for the mission item.
current: u8
MAVLink field current
.
Not used.
autocontinue: u8
MAVLink field autocontinue
.
Not used (set 0).
param1: f32
MAVLink field param1
.
PARAM1, see MAV_CMD enum
param2: f32
MAVLink field param2
.
PARAM2, see MAV_CMD enum
param3: f32
MAVLink field param3
.
PARAM3, see MAV_CMD enum
param4: f32
MAVLink field param4
.
PARAM4, see MAV_CMD enum
x: i32
MAVLink field x
.
PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
y: i32
MAVLink field y
.
PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7
z: f32
MAVLink field z
.
PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame).
Implementations§
Source§impl CommandInt
impl CommandInt
Sourcepub const fn spec() -> MessageInfo
pub const fn spec() -> MessageInfo
Returns specification for this message.
Sourcepub const fn message_id() -> u32
pub const fn message_id() -> u32
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 CommandInt
impl Clone for CommandInt
Source§fn clone(&self) -> CommandInt
fn clone(&self) -> CommandInt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommandInt
impl Debug for CommandInt
Source§impl Default for CommandInt
impl Default for CommandInt
Source§fn default() -> CommandInt
fn default() -> CommandInt
Source§impl<'de> Deserialize<'de> for CommandInt
impl<'de> Deserialize<'de> for CommandInt
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<CommandInt> for CameraMsrv
impl From<CommandInt> for CameraMsrv
Source§fn from(value: CommandInt) -> CameraMsrv
fn from(value: CommandInt) -> CameraMsrv
Source§impl From<CommandInt> for CommandInt
impl From<CommandInt> for CommandInt
Source§fn from(value: CommandInt) -> CommandInt
fn from(value: CommandInt) -> CommandInt
Source§impl IntoPayload for CommandInt
impl IntoPayload for CommandInt
Source§impl MessageSpec for CommandInt
impl MessageSpec for CommandInt
Source§impl MessageSpecStatic for CommandInt
impl MessageSpecStatic for CommandInt
Source§fn spec() -> MessageInfo
fn spec() -> MessageInfo
Source§fn message_id() -> u32
fn message_id() -> u32
ID
.Source§fn min_supported_mavlink_version() -> MavLinkVersion
fn min_supported_mavlink_version() -> MavLinkVersion
Source§impl NamedType for CommandInt
impl NamedType for CommandInt
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 CommandInt
impl PartialEq for CommandInt
Source§impl Serialize for CommandInt
impl Serialize for CommandInt
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&Payload> for CommandInt
impl TryFrom<&Payload> for CommandInt
Source§impl TryFrom<CommandInt> for CommandInt
impl TryFrom<CommandInt> for CommandInt
Source§fn try_from(
value: CommandInt,
) -> Result<CommandInt, <CommandInt as TryFrom<CommandInt>>::Error>
fn try_from( value: CommandInt, ) -> Result<CommandInt, <CommandInt as TryFrom<CommandInt>>::Error>
Source§impl Type for CommandInt
impl Type for CommandInt
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.