pub struct RadioRcChannels {
pub target_system: u8,
pub target_component: u8,
pub time_last_update_ms: u32,
pub flags: RadioRcChannelsFlags,
pub count: u8,
pub channels: [i16; 32],
}Expand description
MAVLink RADIO_RC_CHANNELS message.
The minimum supported MAVLink version is MAVLink 2.
§Description
RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS). Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller. The target_system field should normally be set to the system id of the system to control, typically the flight controller. The target_component field can normally be set to 0, so that all components of the system can receive the message. The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field. The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver’s time domain. The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled). The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent). The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver’s failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost). In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver). For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data. Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink’s trailing-zero trimming.
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
RadioRcChannels (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§target_system: u8MAVLink field target_system.
System ID (ID of target system, normally flight controller).
target_component: u8MAVLink field target_component.
Component ID (normally 0 for broadcast).
time_last_update_ms: u32MAVLink field time_last_update_ms.
Time when the data in the channels field were last updated (time since boot in the receiver’s time domain).
flags: RadioRcChannelsFlagsMAVLink field flags.
Radio RC channels status flags.
count: u8MAVLink field count.
Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message.
channels: [i16; 32]MAVLink field channels.
RC channels. Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500. Channels with indexes equal or above count should be set to 0, to benefit from MAVLink’s trailing-zero trimming.
Implementations§
Source§impl RadioRcChannels
impl RadioRcChannels
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 RadioRcChannels
impl Clone for RadioRcChannels
Source§fn clone(&self) -> RadioRcChannels
fn clone(&self) -> RadioRcChannels
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RadioRcChannels
impl Debug for RadioRcChannels
Source§impl Default for RadioRcChannels
impl Default for RadioRcChannels
Source§fn default() -> RadioRcChannels
fn default() -> RadioRcChannels
Source§impl<'de> Deserialize<'de> for RadioRcChannels
impl<'de> Deserialize<'de> for RadioRcChannels
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RadioRcChannels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RadioRcChannels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Flatten for RadioRcChannels
Source§impl From<RadioRcChannels> for Development
impl From<RadioRcChannels> for Development
Source§fn from(value: RadioRcChannels) -> Development
fn from(value: RadioRcChannels) -> Development
Source§impl IntoPayload for RadioRcChannels
impl IntoPayload for RadioRcChannels
impl Message for RadioRcChannels
Source§impl MessageSpec for RadioRcChannels
impl MessageSpec for RadioRcChannels
Source§impl MessageSpecStatic for RadioRcChannels
impl MessageSpecStatic for RadioRcChannels
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 RadioRcChannels
impl NamedType for RadioRcChannels
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 RadioRcChannels
impl PartialEq for RadioRcChannels
Source§fn eq(&self, other: &RadioRcChannels) -> bool
fn eq(&self, other: &RadioRcChannels) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RadioRcChannels
impl Serialize for RadioRcChannels
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,
impl StructuralPartialEq for RadioRcChannels
Source§impl TryFrom<&Payload> for RadioRcChannels
impl TryFrom<&Payload> for RadioRcChannels
Source§impl Type for RadioRcChannels
impl Type for RadioRcChannels
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.