diff --git a/APMrover2/mode_auto.cpp b/APMrover2/mode_auto.cpp index 74bc7c6c30..ba19f8b94c 100644 --- a/APMrover2/mode_auto.cpp +++ b/APMrover2/mode_auto.cpp @@ -3,6 +3,12 @@ bool ModeAuto::_enter() { + // fail to enter auto if no mission commands + if (mission.num_commands() == 0) { + gcs().send_text(MAV_SEVERITY_NOTICE, "No Mission. Can't set AUTO."); + return false; + } + auto_triggered = false; rover.restart_nav(); rover.loiter_start_time = 0;