diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-12-29 12:16:49 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-12-29 12:16:49 +0400 |
commit | 7e29028429fce33b88dd1eeb6d3ac89aa5cb5891 (patch) | |
tree | d230c7392fa457227c35dc4e80720e3d5ac44d32 /src/modules/uORB/topics/vehicle_control_mode.h | |
parent | 72d9c80ce954d2289282f5df01aef7e5e8914acc (diff) | |
download | px4-firmware-7e29028429fce33b88dd1eeb6d3ac89aa5cb5891.tar.gz px4-firmware-7e29028429fce33b88dd1eeb6d3ac89aa5cb5891.tar.bz2 px4-firmware-7e29028429fce33b88dd1eeb6d3ac89aa5cb5891.zip |
Moving nav state from commander to navigator, WIP
Diffstat (limited to 'src/modules/uORB/topics/vehicle_control_mode.h')
-rw-r--r-- | src/modules/uORB/topics/vehicle_control_mode.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/modules/uORB/topics/vehicle_control_mode.h b/src/modules/uORB/topics/vehicle_control_mode.h index e26fb97c8..5ce968f67 100644 --- a/src/modules/uORB/topics/vehicle_control_mode.h +++ b/src/modules/uORB/topics/vehicle_control_mode.h @@ -48,6 +48,7 @@ #include <stdint.h> #include <stdbool.h> #include "../uORB.h" +#include "vehicle_status.h" /** * @addtogroup topics @{ @@ -59,10 +60,25 @@ * * Encodes the complete system state and is set by the commander app. */ + +typedef enum { + NAV_STATE_INIT = 0, + NAV_STATE_NONE, + NAV_STATE_LOITER, + NAV_STATE_MISSION, + NAV_STATE_MISSION_LOITER, + NAV_STATE_RTL, + NAV_STATE_RTL_LOITER, + NAV_STATE_MAX +} nav_state_t; + struct vehicle_control_mode_s { uint64_t timestamp; /**< in microseconds since system start, is set whenever the writing thread stores new data */ + main_state_t main_state; + nav_state_t nav_state; + bool flag_armed; bool flag_external_manual_override_ok; /**< external override non-fatal for system. Only true for fixed wing */ @@ -79,9 +95,6 @@ struct vehicle_control_mode_s bool flag_control_altitude_enabled; /**< true if altitude is controlled */ bool flag_control_climb_rate_enabled; /**< true if climb rate is controlled */ bool flag_control_flighttermination_enabled; /**< true if flighttermination is enabled */ - - bool flag_control_auto_enabled; // TEMP - uint8_t auto_state; // TEMP navigation state for AUTO modes }; /** |