AP_Arming: remove redundant trim checks in Copter/Sub

The main rc_calibration_checks method checks all channels, not just the subset being tested explicitly on Copter/Sub.

The code making this redundant was added in 1b18a78d1d with a comment "Add a RC check that (<=min trim max) for all channels.
This commit is contained in:
Peter Barker 2023-03-24 12:54:17 +11:00 committed by Peter Barker
parent 686da203f5
commit 575d803904
1 changed files with 0 additions and 17 deletions

View File

@ -1689,23 +1689,6 @@ bool AP_Arming::rc_checks_copter_sub(const bool display_failure, const RC_Channe
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;
} }
bool fail = true;
if (i == 2) {
// skip checking trim for throttle as older code did not check it
fail = false;
}
if (channel->get_radio_trim() < channel->get_radio_min()) {
check_failed(ARMING_CHECK_RC, display_failure, "%s radio trim below min", channel_name);
if (fail) {
ret = false;
}
}
if (channel->get_radio_trim() > channel->get_radio_max()) {
check_failed(ARMING_CHECK_RC, display_failure, "%s radio trim above max", channel_name);
if (fail) {
ret = false;
}
}
} }
return ret; return ret;
} }