Plane: do not run any prearm checks if we are armed or arming is not required

Co-authored-by: TunaLobster <unknown>
This commit is contained in:
Peter Barker 2021-07-06 11:19:53 +10:00 committed by Andrew Tridgell
parent dd156d8da6
commit 5b7ec1fab4
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ const AP_Param::GroupInfo AP_Arming_Plane::var_info[] = {
*/
bool AP_Arming_Plane::pre_arm_checks(bool display_failure)
{
if (armed || require == (uint8_t)Required::NO) {
// if we are already armed or don't need any arming checks
// then skip the checks
return true;
}
//are arming checks disabled?
if (checks_to_perform == 0) {
return true;