Browse Source

AP_Arming: use RC_CALIB_MIN_LIMIT_PWM and RC_CALIB_MAX_LIMIT_PWM

zr-v5.1
Pierre Kancir 4 years ago committed by Andrew Tridgell
parent
commit
68a27e3b41
  1. 4
      libraries/AP_Arming/AP_Arming.cpp

4
libraries/AP_Arming/AP_Arming.cpp

@ -1260,11 +1260,11 @@ bool AP_Arming::rc_checks_copter_sub(const bool display_failure, const RC_Channe
const RC_Channel *channel = channels[i]; const RC_Channel *channel = channels[i];
const char *channel_name = channel_names[i]; const char *channel_name = channel_names[i];
// check if radio has been calibrated // check if radio has been calibrated
if (channel->get_radio_min() > 1300) { if (channel->get_radio_min() > RC_Channel::RC_CALIB_MIN_LIMIT_PWM) {
check_failed(ARMING_CHECK_RC, display_failure, "%s radio min too high", channel_name); check_failed(ARMING_CHECK_RC, display_failure, "%s radio min too high", channel_name);
ret = false; ret = false;
} }
if (channel->get_radio_max() < 1700) { if (channel->get_radio_max() < RC_Channel::RC_CALIB_MAX_LIMIT_PWM) {
check_failed(ARMING_CHECK_RC, display_failure, "%s radio max too low", channel_name); check_failed(ARMING_CHECK_RC, display_failure, "%s radio max too low", channel_name);
ret = false; ret = false;
} }

Loading…
Cancel
Save