From 2bfb6727912e804325e5a512c9c09d36e8fe06d3 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 1 Dec 2012 16:29:06 +0100 Subject: [PATCH] Cleaned up mode indication --- apps/mavlink/mavlink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/mavlink/mavlink.c b/apps/mavlink/mavlink.c index 77034914ff..575b42b37b 100644 --- a/apps/mavlink/mavlink.c +++ b/apps/mavlink/mavlink.c @@ -189,10 +189,6 @@ get_mavlink_mode_and_state(uint8_t *mavlink_state, uint8_t *mavlink_mode) *mavlink_mode = 0; /* set mode flags independent of system state */ - if (v_status.flag_control_manual_enabled) { - *mavlink_mode |= MAV_MODE_FLAG_MANUAL_INPUT_ENABLED; - } - if (v_status.flag_hil_enabled) { *mavlink_mode |= MAV_MODE_FLAG_HIL_ENABLED; } @@ -231,11 +227,14 @@ get_mavlink_mode_and_state(uint8_t *mavlink_state, uint8_t *mavlink_mode) case SYSTEM_STATE_STABILIZED: *mavlink_state = MAV_STATE_ACTIVE; *mavlink_mode |= MAV_MODE_FLAG_STABILIZE_ENABLED; + *mavlink_mode |= MAV_MODE_FLAG_GUIDED_ENABLED; break; case SYSTEM_STATE_AUTO: *mavlink_state = MAV_STATE_ACTIVE; *mavlink_mode |= MAV_MODE_FLAG_GUIDED_ENABLED; + *mavlink_mode |= MAV_MODE_FLAG_STABILIZE_ENABLED; + *mavlink_mode |= MAV_MODE_FLAG_AUTO_ENABLED; break; case SYSTEM_STATE_MISSION_ABORT: