ros2_interfaces_rolling/mavros_msgs/msg/
extended_state.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct ExtendedState {
5 pub header: crate::std_msgs::msg::Header,
6 pub vtol_state: u8,
7 pub landed_state: u8,
8}
9
10impl ExtendedState {
11 pub const VTOL_STATE_UNDEFINED: u8 = 0;
12 pub const VTOL_STATE_TRANSITION_TO_FW: u8 = 1;
13 pub const VTOL_STATE_TRANSITION_TO_MC: u8 = 2;
14 pub const VTOL_STATE_MC: u8 = 3;
15 pub const VTOL_STATE_FW: u8 = 4;
16 pub const LANDED_STATE_UNDEFINED: u8 = 0;
17 pub const LANDED_STATE_ON_GROUND: u8 = 1;
18 pub const LANDED_STATE_IN_AIR: u8 = 2;
19 pub const LANDED_STATE_TAKEOFF: u8 = 3;
20 pub const LANDED_STATE_LANDING: u8 = 4;
21}
22
23impl Default for ExtendedState {
24 fn default() -> Self {
25 ExtendedState {
26 header: crate::std_msgs::msg::Header::default(),
27 vtol_state: 0,
28 landed_state: 0,
29 }
30 }
31}
32
33impl ros2_client::Message for ExtendedState {}