mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:13: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
@@ -325,7 +325,8 @@ MissionBlock::is_mission_item_reached()
|
||||
}
|
||||
|
||||
/* check if the MAV was long enough inside the waypoint orbit */
|
||||
if (now - _time_first_inside_orbit >= (hrt_abstime)_mission_item.time_inside * 1e6f) {
|
||||
if ((Navigator::get_time_inside(_mission_item) < FLT_EPSILON) ||
|
||||
(now - _time_first_inside_orbit >= (hrt_abstime)(Navigator::get_time_inside(_mission_item) * 1e6f))) {
|
||||
|
||||
// exit xtrack location
|
||||
if (_mission_item.loiter_exit_xtrack &&
|
||||
|
||||
Reference in New Issue
Block a user