Browse Source

Rover: auto mode fails to enter if no mission

This prevent going into Auto without a mission and skipping the first mission waypoint because we aren't yet in Auto when in enter()
mission-4.1.18
khancyr 8 years ago committed by Randy Mackay
parent
commit
809a9e5894
  1. 6
      APMrover2/mode_auto.cpp

6
APMrover2/mode_auto.cpp

@ -3,6 +3,12 @@
bool ModeAuto::_enter() 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; auto_triggered = false;
rover.restart_nav(); rover.restart_nav();
rover.loiter_start_time = 0; rover.loiter_start_time = 0;

Loading…
Cancel
Save