From 99aa5f49fcc3ead861ed21cba0c4f7d58702ffd6 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 31 May 2016 15:38:44 -0400 Subject: [PATCH] FW ALTCTL requires altitude --- src/modules/commander/state_machine_helper.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp index e979d07e04..1ebf522340 100644 --- a/src/modules/commander/state_machine_helper.cpp +++ b/src/modules/commander/state_machine_helper.cpp @@ -361,10 +361,8 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta case commander_state_s::MAIN_STATE_ALTCTL: /* need at minimum altitude estimate */ - /* TODO: add this for fixedwing as well */ - if (!status->is_rotary_wing || - (status_flags->condition_local_altitude_valid || - status_flags->condition_global_position_valid)) { + if (status_flags->condition_local_altitude_valid || + status_flags->condition_global_position_valid) { ret = TRANSITION_CHANGED; } break;