GCS_MAVLink: allow cancelling of mission upload by sending MISSION_CLEAR_ALL

This commit is contained in:
Peter Barker 2024-08-19 20:52:39 +10:00 committed by Peter Barker
parent 21f6e5da71
commit ebc8a71c36
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ void MissionItemProtocol::handle_mission_clear_all(const GCS_MAVLINK &_link,
const mavlink_message_t &msg) const mavlink_message_t &msg)
{ {
bool success = true; bool success = true;
success = success && !receiving; success = success && cancel_upload(_link, msg);
success = success && clear_all_items(); success = success && clear_all_items();
send_mission_ack(_link, msg, success ? MAV_MISSION_ACCEPTED : MAV_MISSION_ERROR); send_mission_ack(_link, msg, success ? MAV_MISSION_ACCEPTED : MAV_MISSION_ERROR);
} }