mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
DataFlash: stop logging when erasing logs
This commit is contained in:
parent
f35cf2beba
commit
a43e0f6f31
@ -156,6 +156,7 @@ uint16_t DataFlash_Block::GetFilePage()
|
|||||||
|
|
||||||
void DataFlash_Block::EraseAll()
|
void DataFlash_Block::EraseAll()
|
||||||
{
|
{
|
||||||
|
log_write_started = false;
|
||||||
for (uint16_t j = 1; j <= (df_NumPages+1)/8; j++) {
|
for (uint16_t j = 1; j <= (df_NumPages+1)/8; j++) {
|
||||||
BlockErase(j);
|
BlockErase(j);
|
||||||
if (j%6 == 0) {
|
if (j%6 == 0) {
|
||||||
|
@ -113,6 +113,7 @@ char *DataFlash_File::_lastlog_file_name(void)
|
|||||||
void DataFlash_File::EraseAll()
|
void DataFlash_File::EraseAll()
|
||||||
{
|
{
|
||||||
uint16_t log_num;
|
uint16_t log_num;
|
||||||
|
stop_logging();
|
||||||
for (log_num=0; log_num<MAX_LOG_FILES; log_num++) {
|
for (log_num=0; log_num<MAX_LOG_FILES; log_num++) {
|
||||||
char *fname = _log_file_name(log_num);
|
char *fname = _log_file_name(log_num);
|
||||||
if (fname == NULL) {
|
if (fname == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user