From f32fe7760205c4b3c51aabc018782bf7ae7ff711 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 12 Aug 2021 18:28:19 +1000 Subject: [PATCH] Rover: ensure arming when running motor test --- Rover/motor_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rover/motor_test.cpp b/Rover/motor_test.cpp index 81324b3be8..549f3f82da 100644 --- a/Rover/motor_test.cpp +++ b/Rover/motor_test.cpp @@ -124,7 +124,9 @@ MAV_RESULT Rover::mavlink_motor_test_start(const GCS_MAVLINK &gcs_chan, AP_Motor // arm motors if (!arming.is_armed()) { - arming.arm(AP_Arming::Method::MOTORTEST); + if (!arming.arm(AP_Arming::Method::MOTORTEST)) { + return MAV_RESULT_FAILED; + } } // disable failsafes