From 83828e2e06d9241cf98521f30b3946c7ce9aafb8 Mon Sep 17 00:00:00 2001 From: ashvath Date: Wed, 29 Jan 2020 22:22:59 +0530 Subject: [PATCH] Copter: Pre-arm check for mot_pwm --- ArduCopter/AP_Arming.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index 1a039a2bf8..36a4634c03 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -144,6 +144,14 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure) // check various parameter values if ((checks_to_perform == ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_PARAMETERS)) { + // checks MOT_PWM_MIN/MAX for acceptable values +#if (FRAME_CONFIG != HELI_FRAME) + if (copter.motors->check_mot_pwm_params()) { + check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Check MOT_PWM_MAX/MIN"); + return false; + } +#endif + // ensure all rc channels have different functions if (rc().duplicate_options_exist()) { check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Duplicate Aux Switch Options");