Skip to content

Commit

Permalink
commander: no datalink failsafe on ground
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
julianoes committed Mar 3, 2017
1 parent f5ae90a commit c555cf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/commander/state_machine_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c555cf1

Please sign in to comment.