mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 17:23:33 +08:00
Safe Landing Points: Added new RTL_TYPE: closest between home, mission landing and safe points
Signed-off-by: Silvan Fuhrer <silvan@auterion.com> Co-authored by Martina Rivizzigno <martina@rivizzigno.it>
This commit is contained in:
@@ -490,9 +490,16 @@ Navigator::run()
|
||||
const bool rtl_activated = _previous_nav_state != vehicle_status_s::NAVIGATION_STATE_AUTO_RTL;
|
||||
|
||||
switch (rtl_type()) {
|
||||
case RTL::RTL_LAND:
|
||||
case RTL::RTL_LAND: // use mission landing
|
||||
case RTL::RTL_CLOSEST:
|
||||
if (rtl_activated) {
|
||||
mavlink_and_console_log_info(get_mavlink_log_pub(), "RTL LAND activated");
|
||||
if (rtl_type() == RTL::RTL_LAND) {
|
||||
mavlink_and_console_log_info(get_mavlink_log_pub(), "RTL LAND activated");
|
||||
|
||||
} else {
|
||||
mavlink_and_console_log_info(get_mavlink_log_pub(), "RTL Closest landing point activated");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// if RTL is set to use a mission landing and mission has a planned landing, then use MISSION to fly there directly
|
||||
@@ -570,6 +577,7 @@ Navigator::run()
|
||||
|
||||
navigation_mode_new = &_rtl;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user