commander: no datalink failsafe on ground

On SITL startup we got a datalink lost failsafe message whenever home
was initialized. The reason that in standalone SITL, there is usually no
datalink connected. However, on ground, we shouldn't really failsafe,
therefore it makes sense not to enter the state in the first place.
This commit is contained in:
Julian Oes 2017-03-03 09:33:20 +00:00 committed by Lorenz Meier
parent c715228b8f
commit 24819ce7b1

View File

@ -844,10 +844,10 @@ bool set_nav_state(struct vehicle_status_s *status,
status->nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_gps);
/* also go into failsafe if just datalink is lost */
/* also go into failsafe if just datalink is lost, and we're actually in air */
} else if (status->data_link_lost && data_link_loss_act_configured) {
enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_datalink);
} else if (status->data_link_lost && data_link_loss_act_configured && !landed) {
set_data_link_loss_nav_state(status, armed, status_flags, data_link_loss_act);