mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 07:09:48 +08:00
Navigator RTL: run find_RTL_destination() only on_inactive
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -322,9 +322,8 @@ void RTL::on_active()
|
||||
rtl_time_estimate_s rtl_time_estimate{};
|
||||
rtl_time_estimate.valid = false;
|
||||
|
||||
// Calculate RTL destination and time estimate only when there is a valid home and global position
|
||||
// Calculate time estimate only when there is a valid home and global position
|
||||
if (_navigator->home_global_position_valid() && global_position_recently_updated) {
|
||||
find_RTL_destination();
|
||||
calcRtlTimeEstimate(_rtl_state, rtl_time_estimate);
|
||||
rtl_time_estimate.valid = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user