From 9d9f20a6cb710eb41fa90da2cccadc7e148ce8c6 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Wed, 22 Apr 2015 11:42:01 -0400 Subject: [PATCH] Copter: Add Motor Interlock/E-Stop Conflict Prearm Check --- ArduCopter/motors.pde | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 5cf1962511..aa4555355a 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -240,6 +240,15 @@ static bool pre_arm_checks(bool display_failure) return true; } + // check if motor interlock and E-stop aux switches are used + // at the same time. This cannot be allowed. + if (check_if_auxsw_mode_used(AUXSW_MOTOR_INTERLOCK) && check_if_auxsw_mode_used(AUXSW_MOTOR_ESTOP)){ + if (display_failure) { + gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Interlock/E-Stop Conflict")); + } + return false; + } + // check if motor interlock aux switch is in use // if it is, switch needs to be in disabled position to arm // otherwise exit immediately. This check to be repeated,