Plane: Remove unutilized case

This commit is contained in:
Rishabh 2020-02-23 13:59:23 +05:30 committed by Andrew Tridgell
parent 30fd915312
commit 0b01bb531d

View File

@ -295,15 +295,6 @@ void Plane::crash_detection_update(void)
} else if ((now_ms - crash_state.debounce_timer_ms >= crash_state.debounce_time_total_ms) && !crash_state.is_crashed) { } else if ((now_ms - crash_state.debounce_timer_ms >= crash_state.debounce_time_total_ms) && !crash_state.is_crashed) {
crash_state.is_crashed = true; crash_state.is_crashed = true;
if (aparm.crash_detection_enable == CRASH_DETECT_ACTION_BITMASK_DISABLED) {
if (crashed_near_land_waypoint) {
gcs().send_text(MAV_SEVERITY_CRITICAL, "Hard landing detected. No action taken");
} else {
gcs().send_text(MAV_SEVERITY_EMERGENCY, "Crash detected. No action taken");
}
}
else {
if (aparm.crash_detection_enable & CRASH_DETECT_ACTION_BITMASK_DISARM) { if (aparm.crash_detection_enable & CRASH_DETECT_ACTION_BITMASK_DISARM) {
arming.disarm(AP_Arming::Method::CRASH); arming.disarm(AP_Arming::Method::CRASH);
} }
@ -313,7 +304,6 @@ void Plane::crash_detection_update(void)
gcs().send_text(MAV_SEVERITY_EMERGENCY, "Crash detected"); gcs().send_text(MAV_SEVERITY_EMERGENCY, "Crash detected");
} }
} }
}
} }
/* /*