Browse Source

Copter: parachute failure message if landed

mission-4.1.18
Randy Mackay 10 years ago
parent
commit
41077be4ad
  1. 12
      ArduCopter/crash_check.pde
  2. 3
      ArduCopter/defines.h

12
ArduCopter/crash_check.pde

@ -176,8 +176,18 @@ static void parachute_manual_release() @@ -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

3
ArduCopter/defines.h

@ -357,8 +357,9 @@ enum FlipState { @@ -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

Loading…
Cancel
Save