mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 12:30:34 +08:00
navigator: Wrap get time inside into function call and set time inside to zero
This ensures that the dual-use of the pitch_min / time_inside field is handled properly between takeoff and non-takeoff items. Flight tested in SITL.
This commit is contained in:
committed by
Lorenz Meier
parent
5ddd69c872
commit
05bc9acfb7
@@ -271,8 +271,8 @@ RTL::set_rtl_item()
|
||||
|
||||
_navigator->set_can_loiter_at_sp(true);
|
||||
|
||||
if (autoland && (_mission_item.time_inside > FLT_EPSILON)) {
|
||||
mavlink_log_info(_navigator->get_mavlink_log_pub(), "RTL: loiter %.1fs", (double)_mission_item.time_inside);
|
||||
if (autoland && (Navigator::get_time_inside(_mission_item) > FLT_EPSILON)) {
|
||||
mavlink_log_info(_navigator->get_mavlink_log_pub(), "RTL: loiter %.1fs", (double)Navigator::get_time_inside(_mission_item));
|
||||
|
||||
} else {
|
||||
mavlink_log_info(_navigator->get_mavlink_log_pub(), "RTL: completed, loiter");
|
||||
|
||||
Reference in New Issue
Block a user