HAL_ChibiOS: stop logging before reboot

This commit is contained in:
Alexander Malishev 2018-06-07 00:00:26 +04:00 committed by Peter Barker
parent cfa18b8e70
commit 95f3eb5ab6
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <AP_HAL_ChibiOS/RCInput.h>
#include <AP_HAL_ChibiOS/CAN.h>
#include <DataFlash/DataFlash.h>
#include <AP_Scheduler/AP_Scheduler.h>
#include <AP_BoardConfig/AP_BoardConfig.h>
#include "shared_dma.h"
@ -238,6 +239,9 @@ void Scheduler::reboot(bool hold_in_bootloader)
hal.rcout->force_safety_on();
hal.rcout->force_safety_no_wait();
//stop logging
DataFlash_Class::instance()->StopLogging();
// stop sdcard driver, if active
sdcard_stop();