diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index a003f23756..119971f059 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -238,11 +238,15 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure) } #else - if (copter.g2.frame_class.get() == AP_Motors::MOTOR_FRAME_HELI_QUAD || - copter.g2.frame_class.get() == AP_Motors::MOTOR_FRAME_HELI_DUAL || - copter.g2.frame_class.get() == AP_Motors::MOTOR_FRAME_HELI) { + switch (copter.g2.frame_class.get()) { + case AP_Motors::MOTOR_FRAME_HELI_QUAD: + case AP_Motors::MOTOR_FRAME_HELI_DUAL: + case AP_Motors::MOTOR_FRAME_HELI: check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Invalid MultiCopter FRAME_CLASS"); return false; + + default: + break; } #endif // HELI_FRAME