ArduPilot/ardupilot

handle_mission_write_partial_list is too strict

開放

#4,889 建立於 2016年9月25日

 (3 則留言) (0 個反應) (0 位負責人)C++ (15,603 個分叉)batch import
AllVehiclesLibraryMAVLinkgood first issue

倉庫指標

星標
 (9,336 顆星)
PR 合併指標
 (平均合併 26天 16小時) (30 天內合併 166 個 PR)

描述

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.

貢獻者指南