mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 04:20:35 +08:00
rtl+mission: remove do_need_move_to_land and handleLanding duplicated code to reduce flash
This commit is contained in:
@@ -322,14 +322,7 @@ void RtlDirect::set_rtl_item()
|
||||
|
||||
_mission_item.land_precision = _param_rtl_pld_md.get();
|
||||
|
||||
if (_mission_item.land_precision == 1) {
|
||||
_navigator->get_precland()->set_mode(PrecLandMode::Opportunistic);
|
||||
_navigator->get_precland()->on_activation();
|
||||
|
||||
} else if (_mission_item.land_precision == 2) {
|
||||
_navigator->get_precland()->set_mode(PrecLandMode::Required);
|
||||
_navigator->get_precland()->on_activation();
|
||||
}
|
||||
startPrecLand(_mission_item.land_precision);
|
||||
|
||||
_rtl_state = RTLState::IDLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user