mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-10 06:58:53 +08:00
mission_block: replace idle with landed check
which is the alternative solution mentioned in the original PR: https://github.com/PX4/PX4-Autopilot/pull/23674
This commit is contained in:
@@ -981,9 +981,7 @@ void MissionBlock::updateAltToAvoidTerrainCollisionAndRepublishTriplet(mission_i
|
||||
|
||||
if (_navigator->get_nav_min_gnd_dist_param() > FLT_EPSILON && _mission_item.nav_cmd != NAV_CMD_LAND
|
||||
&& _mission_item.nav_cmd != NAV_CMD_VTOL_LAND && _mission_item.nav_cmd != NAV_CMD_DO_VTOL_TRANSITION
|
||||
// && _mission_item.nav_cmd != NAV_CMD_IDLE
|
||||
// this one was very specifically put here: https://github.com/PX4/PX4-Autopilot/pull/23674
|
||||
// do we need some other way to encode "mission finisihed"?
|
||||
&& !_navigator->get_land_detected()->landed
|
||||
&& _navigator->get_local_position()->dist_bottom_valid
|
||||
&& _navigator->get_local_position()->dist_bottom < _navigator->get_nav_min_gnd_dist_param()
|
||||
&& _navigator->get_local_position()->vz > FLT_EPSILON
|
||||
|
||||
Reference in New Issue
Block a user