DataFlash: reset write log on new log

This commit is contained in:
Andrew Tridgell 2014-01-14 14:28:56 +11:00
parent 9d09a96377
commit 921f923c5f
2 changed files with 3 additions and 0 deletions

View File

@ -383,6 +383,8 @@ uint16_t DataFlash_File::start_new_log(void)
return 0xFFFF;
}
_write_offset = 0;
_writebuf_head = 0;
_writebuf_tail = 0;
log_write_started = true;
// now update lastlog.txt with the new log number

View File

@ -15,6 +15,7 @@
#else
#define perf_begin(x)
#define perf_end(x)
#define perf_count(x)
#endif