ArduPilot / ArduPilot/ardupilot

handle_mission_write_partial_list is too strict

Open
#4,889 3 comments 0 reactions 0 assignees View on GitHub
AllVehicles good first issue Library MAVLink
Dominant language
C++
Stars
15.9k
Forks
21.4k
Avg merge
3d 17h
Merged PRs (30d)
119

Description

#### Issue details

Currently `GCSCommon.cpp@handle_mission_write_partial_list` checks if the partial waypoint list is inside the current mission count boundary unnecessarily. This limits the utility of partial waypoint writing modifications because we can never expand the mission count.

A very simple case is appending a waypoint to a waypoint list. As far as I know a full rewrite of the mission plan would be required because the only other way to change the waypoint list is sending a `mavlink_msg_mission_count*` message with the previous mission count plus one. This is exactly what a partial list is for.

Removing the upper bound checks would not result in a problem because `GCS_Common.cpp@GCS_MAVLINK::handle_mission_item:839` already handles the case where the mission seq is bigger than mission.num_commands().

Am I wrong in these assumptions? If theoretically there is no problem I can produce a patch removing the upper bound checks.

Contributor guide

Open the contributing guide

Research direction

Start in GCSCommon.cpp at handle_mission_write_partial_list and compare its boundary checks with GCS_Common.cpp@GCS_MAVLINK::handle_mission_item:839. Trace how partial mission writes and mission counts are handled, then verify whether expanding the mission count preserves existing behavior and add or run the relevant mission-handling tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, embedded-iot, robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.