GCS_MAVLink: send mission acks for bad MISSION_ITEM requests

This commit is contained in:
Peter Barker 2019-08-02 09:52:10 +10:00 committed by Peter Barker
parent afd623a6fa
commit 4e95832433
1 changed files with 2 additions and 0 deletions

View File

@ -135,12 +135,14 @@ void MissionItemProtocol::handle_mission_request(const GCS_MAVLINK &_link,
MAV_MISSION_RESULT ret = get_item(_link, msg, request_int, item_int);
if (ret != MAV_MISSION_ACCEPTED) {
send_mission_ack(_link, msg, ret);
return;
}
mavlink_mission_item_t ret_packet{};
ret = AP_Mission::convert_MISSION_ITEM_INT_to_MISSION_ITEM(item_int, ret_packet);
if (ret != MAV_MISSION_ACCEPTED) {
send_mission_ack(_link, msg, ret);
return;
}