Merge branch 'rc_timeout' into mpc_rc

This commit is contained in:
Anton Babushkin
2014-04-23 19:03:03 +02:00
3 changed files with 34 additions and 32 deletions
+8 -3
View File
@@ -1100,7 +1100,7 @@ int commander_thread_main(int argc, char *argv[])
status_changed = true;
}
/* update subsystem */
/* update position setpoint triplet */
orb_check(pos_sp_triplet_sub, &updated);
if (updated) {
@@ -1319,10 +1319,15 @@ int commander_thread_main(int argc, char *argv[])
} else {
/* failsafe for manual modes */
transition_result_t res = failsafe_state_transition(&status, FAILSAFE_STATE_RTL);
transition_result_t res = TRANSITION_DENIED;
if (!status.condition_landed) {
/* vehicle is not landed, try to perform RTL */
res = failsafe_state_transition(&status, FAILSAFE_STATE_RTL);
}
if (res == TRANSITION_DENIED) {
/* RTL not allowed (no global position estimate), try LAND */
/* RTL not allowed (no global position estimate) or not wanted, try LAND */
res = failsafe_state_transition(&status, FAILSAFE_STATE_LAND);
if (res == TRANSITION_DENIED) {