Browse Source

Copter: check_mot_pwm_params arming check returns true on success

zr-v5.1
Randy Mackay 5 years ago
parent
commit
74e3ca75a7
  1. 14
      ArduCopter/AP_Arming.cpp

14
ArduCopter/AP_Arming.cpp

@ -148,14 +148,6 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure) @@ -148,14 +148,6 @@ 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");
@ -231,6 +223,12 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure) @@ -231,6 +223,12 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure)
check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Invalid MultiCopter FRAME_CLASS");
return false;
}
// checks MOT_PWM_MIN/MAX for acceptable values
if (!copter.motors->check_mot_pwm_params()) {
check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Check MOT_PWM_MIN/MAX");
return false;
}
#endif // HELI_FRAME
// checks when using range finder for RTL

Loading…
Cancel
Save