AP_Arming: use new misison present method

This commit is contained in:
Iampete1 2025-01-14 16:46:31 +00:00 committed by Andrew Tridgell
parent 8d1a6f2bdb
commit 84381e2e5c

View File

@ -897,7 +897,7 @@ bool AP_Arming::mission_checks(bool report)
// do not allow arming if there are no mission items and we are in
// (e.g.) AUTO mode
if (AP::vehicle()->current_mode_requires_mission() &&
(mission == nullptr || mission->num_commands() <= 1)) {
(mission == nullptr || !mission->present())) {
check_failed(ARMING_CHECK_MISSION, report, "Mode requires mission");
return false;
}