diff --git a/ArduCopter/crash_check.pde b/ArduCopter/crash_check.pde index ad5bdf9f27..45b3389526 100644 --- a/ArduCopter/crash_check.pde +++ b/ArduCopter/crash_check.pde @@ -176,8 +176,18 @@ static void parachute_manual_release() return; } + // do not release if vehicle is landed // do not release if we are landed or below the minimum altitude above home - if (ap.land_complete || (parachute.alt_min() != 0 && (current_loc.alt < (int32_t)parachute.alt_min() * 100))) { + if (ap.land_complete) { + // warn user of reason for failure + gcs_send_text_P(SEVERITY_HIGH,PSTR("Parachute: Landed")); + // log an error in the dataflash + Log_Write_Error(ERROR_SUBSYSTEM_PARACHUTE, ERROR_CODE_PARACHUTE_LANDED); + return; + } + + // do not release if we are landed or below the minimum altitude above home + if ((parachute.alt_min() != 0 && (current_loc.alt < (int32_t)parachute.alt_min() * 100))) { // warn user of reason for failure gcs_send_text_P(SEVERITY_HIGH,PSTR("Parachute: Too Low")); // log an error in the dataflash diff --git a/ArduCopter/defines.h b/ArduCopter/defines.h index d9ab325573..4d33ca3b5a 100644 --- a/ArduCopter/defines.h +++ b/ArduCopter/defines.h @@ -357,8 +357,9 @@ enum FlipState { #define ERROR_CODE_FLIP_ABANDONED 2 // subsystem specific error codes -- autotune #define ERROR_CODE_AUTOTUNE_BAD_GAINS 2 -// parachute failed to deploy because of low altitude +// parachute failed to deploy because of low altitude or landed #define ERROR_CODE_PARACHUTE_TOO_LOW 2 +#define ERROR_CODE_PARACHUTE_LANDED 3 // EKF check definitions #define ERROR_CODE_EKFCHECK_BAD_VARIANCE 2 #define ERROR_CODE_EKFCHECK_VARIANCE_CLEARED 0