From 9b7b48068811a27904b41159540a325f6648cfc4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 6 Jul 2018 09:59:05 +1000 Subject: [PATCH] Copter: force log-disarmed on crash check triggering --- ArduCopter/crash_check.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArduCopter/crash_check.cpp b/ArduCopter/crash_check.cpp index 0026102fa1..7bc9d567ee 100644 --- a/ArduCopter/crash_check.cpp +++ b/ArduCopter/crash_check.cpp @@ -44,6 +44,8 @@ void Copter::crash_check() if (crash_counter >= (CRASH_CHECK_TRIGGER_SEC * scheduler.get_loop_rate_hz())) { // log an error in the dataflash Log_Write_Error(ERROR_SUBSYSTEM_CRASH_CHECK, ERROR_CODE_CRASH_CHECK_CRASH); + // keep logging even if disarmed: + DataFlash_Class::instance()->set_force_log_disarmed(true); // send message to gcs gcs().send_text(MAV_SEVERITY_EMERGENCY,"Crash: Disarming"); // disarm motors