mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user