Navigator: set _land_start_index to first item with a position after the marker

_land_start_index is used to to start the mission from this item index, and to
avoid to publish a triplet.current.type=IDLE, we need to fill it with the actual
position setpoint that the vehicle should go to at the start of a mission landing.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-02-20 06:50:53 +01:00
committed by Roman Bapst
parent fafcdbf4ed
commit 1acb07c600
2 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -545,9 +545,9 @@ void Navigator::run()
} else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_LAND_START) {
/* find NAV_CMD_DO_LAND_START in the mission and
* use MAV_CMD_MISSION_START to start the mission there
*/
// find NAV_CMD_DO_LAND_START in the mission and
// use MAV_CMD_MISSION_START to start the mission from the next item containing a position setpoint
if (_mission.land_start()) {
vehicle_command_s vcmd = {};
vcmd.command = vehicle_command_s::VEHICLE_CMD_MISSION_START;