mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:33:33 +08:00
commander: fix incorrect return in set_link_loss_nav_state()
If both local position and altitude were not valid, then both RC loss and datalink loss would not trigger any failsafe at all, independently from the configured action.
This commit is contained in:
@@ -755,12 +755,13 @@ void set_link_loss_nav_state(vehicle_status_s &status, actuator_armed_s &armed,
|
||||
} else {
|
||||
if (status_flags.local_position_valid) {
|
||||
status.nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LAND;
|
||||
return;
|
||||
|
||||
} else if (status_flags.local_altitude_valid) {
|
||||
status.nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// FALLTHROUGH
|
||||
|
||||
Reference in New Issue
Block a user