mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:03:34 +08:00
Navigator: Fix RTL command lnd logic for missions
The navigator was sending RTL commands in the wrong circumstances leading to a cycle between Navigator and Commander.
This commit is contained in:
@@ -481,16 +481,6 @@ Navigator::task_main()
|
||||
PX4_WARN("planned landing not available");
|
||||
}
|
||||
|
||||
} else if (cmd.command == vehicle_command_s::VEHICLE_CMD_NAV_RETURN_TO_LAUNCH) {
|
||||
|
||||
vehicle_command_s vcmd = {};
|
||||
vcmd.target_system = get_vstatus()->system_id;
|
||||
vcmd.target_component = get_vstatus()->component_id;
|
||||
vcmd.command = vehicle_command_s::VEHICLE_CMD_NAV_RETURN_TO_LAUNCH;
|
||||
|
||||
orb_advert_t pub = orb_advertise_queue(ORB_ID(vehicle_command), &vcmd, vehicle_command_s::ORB_QUEUE_LENGTH);
|
||||
(void)orb_unadvertise(pub);
|
||||
|
||||
} else if (cmd.command == vehicle_command_s::VEHICLE_CMD_MISSION_START) {
|
||||
|
||||
if (get_mission_result()->valid &&
|
||||
|
||||
Reference in New Issue
Block a user