pub struct SysStatus {Show 16 fields
pub onboard_control_sensors_present: MavSysStatusSensor,
pub onboard_control_sensors_enabled: MavSysStatusSensor,
pub onboard_control_sensors_health: MavSysStatusSensor,
pub load: u16,
pub voltage_battery: u16,
pub current_battery: i16,
pub battery_remaining: i8,
pub drop_rate_comm: u16,
pub errors_comm: u16,
pub errors_count1: u16,
pub errors_count2: u16,
pub errors_count3: u16,
pub errors_count4: u16,
pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
}
Expand description
MAVLink SYS_STATUS
message.
The minimum supported MAVLink version is MAVLink 1
.
§Description
The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout.
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload>
for
SysStatus
(encoding) and [IntoPayload
] (decoding) traits.
These traits are implemented by Message
proc macro.
Fields§
§onboard_control_sensors_present: MavSysStatusSensor
MAVLink field onboard_control_sensors_present
.
Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
onboard_control_sensors_enabled: MavSysStatusSensor
MAVLink field onboard_control_sensors_enabled
.
Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
onboard_control_sensors_health: MavSysStatusSensor
MAVLink field onboard_control_sensors_health
.
Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
load: u16
MAVLink field load
.
Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
voltage_battery: u16
MAVLink field voltage_battery
.
Battery voltage, UINT16_MAX: Voltage not sent by autopilot
current_battery: i16
MAVLink field current_battery
.
Battery current, -1: Current not sent by autopilot
battery_remaining: i8
MAVLink field battery_remaining
.
Battery energy remaining, -1: Battery remaining energy not sent by autopilot
drop_rate_comm: u16
MAVLink field drop_rate_comm
.
Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
errors_comm: u16
MAVLink field errors_comm
.
Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
errors_count1: u16
MAVLink field errors_count1
.
Autopilot-specific errors
errors_count2: u16
MAVLink field errors_count2
.
Autopilot-specific errors
errors_count3: u16
MAVLink field errors_count3
.
Autopilot-specific errors
errors_count4: u16
MAVLink field errors_count4
.
Autopilot-specific errors
onboard_control_sensors_present_extended: MavSysStatusSensorExtended
MAVLink field onboard_control_sensors_present_extended
.
Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended
MAVLink field onboard_control_sensors_enabled_extended
.
Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
onboard_control_sensors_health_extended: MavSysStatusSensorExtended
MAVLink field onboard_control_sensors_health_extended
.
Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
Implementations§
Source§impl SysStatus
impl SysStatus
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<'de> Deserialize<'de> for SysStatus
impl<'de> Deserialize<'de> for SysStatus
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SysStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SysStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoPayload for SysStatus
impl IntoPayload for SysStatus
Source§impl MessageSpec for SysStatus
impl MessageSpec for SysStatus
Source§impl MessageSpecStatic for SysStatus
impl MessageSpecStatic for SysStatus
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 SysStatus
impl NamedType for SysStatus
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 Serialize for SysStatus
impl Serialize for SysStatus
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 Type for SysStatus
impl Type for SysStatus
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.