Copter: force log-disarmed on crash check triggering

This commit is contained in:
Peter Barker 2018-07-06 09:59:05 +10:00 committed by Randy Mackay
parent ce62b2303a
commit 9b7b480688

View File

@ -44,6 +44,8 @@ void Copter::crash_check()
if (crash_counter >= (CRASH_CHECK_TRIGGER_SEC * scheduler.get_loop_rate_hz())) { if (crash_counter >= (CRASH_CHECK_TRIGGER_SEC * scheduler.get_loop_rate_hz())) {
// log an error in the dataflash // log an error in the dataflash
Log_Write_Error(ERROR_SUBSYSTEM_CRASH_CHECK, ERROR_CODE_CRASH_CHECK_CRASH); 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 // send message to gcs
gcs().send_text(MAV_SEVERITY_EMERGENCY,"Crash: Disarming"); gcs().send_text(MAV_SEVERITY_EMERGENCY,"Crash: Disarming");
// disarm motors // disarm motors