Copter: Add Motor Interlock/E-Stop Conflict Prearm Check

This commit is contained in:
Robert Lefebvre 2015-04-22 11:42:01 -04:00 committed by Randy Mackay
parent fab8604f16
commit 9d9f20a6cb
1 changed files with 9 additions and 0 deletions

View File

@ -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,