diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index 1e05bb7cf1..88273f0f84 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1622,7 +1622,7 @@ mission_item_send_failed: if (mavlink_check_target(packet.target_system,packet.target_component)) break; // start waypoint receiving - if (packet.count > AP_MISSION_MAX_COMMANDS) { + if (packet.count > mission.num_commands_max()) { // send NAK mavlink_msg_mission_ack_send(chan, msg->sysid, msg->compid, MAV_MISSION_NO_SPACE); break;