commander: use DESCEND mode and not LANDGPSFAIL

Always use the DESCEND mode and not LANDGPSFAIL because LANDGPSFAIL will
try to loiter for some time and then request termination instead of
descending gently and trying to land.
This commit is contained in:
Julian Oes
2016-05-17 10:51:55 -04:00
committed by Lorenz Meier
parent 178f32ab41
commit 4d10759699
@@ -665,7 +665,8 @@ bool set_nav_state(struct vehicle_status_s *status, struct commander_state_s *in
} else if (status_flags->data_link_lost_cmd) {
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_RTGS;
} else if (status_flags->gps_failure_cmd) {
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LANDGPSFAIL;
status->nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
status->failsafe = true;
} else if (status_flags->rc_signal_lost_cmd) {
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_RCRECOVER;
} else if (status_flags->vtol_transition_failure_cmd) {
@@ -673,7 +674,8 @@ bool set_nav_state(struct vehicle_status_s *status, struct commander_state_s *in
/* finished handling commands which have priority, now handle failures */
} else if (status_flags->gps_failure) {
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LANDGPSFAIL;
status->nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
status->failsafe = true;
} else if (status->engine_failure) {
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LANDENGFAIL;
} else if (status_flags->vtol_transition_failure) {