From efab28d7213e1ac63aa9a7027fbe1bb0ec6ed4d8 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 14 Jan 2025 16:47:14 +0000 Subject: [PATCH] Rover: use new misison present method --- Rover/mode_auto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rover/mode_auto.cpp b/Rover/mode_auto.cpp index 0e9b0c94235..d43c6501e07 100644 --- a/Rover/mode_auto.cpp +++ b/Rover/mode_auto.cpp @@ -5,7 +5,7 @@ bool ModeAuto::_enter() { // fail to enter auto if no mission commands - if (mission.num_commands() <= 1) { + if (!mission.present()) { gcs().send_text(MAV_SEVERITY_NOTICE, "No Mission. Can't set AUTO."); return false; } @@ -47,7 +47,7 @@ void ModeAuto::update() // check if mission exists (due to being cleared while disarmed in AUTO, // if no mission, then stop...needs mode change out of AUTO, mission load, // and change back to AUTO to run a mission at this point - if (!hal.util->get_soft_armed() && mission.num_commands() <= 1) { + if (!hal.util->get_soft_armed() && !mission.present()) { start_stop(); } // start or update mission