mirror of https://github.com/ArduPilot/ardupilot
Log_simple uses identical implementation of do_erase_logs.
* fix build1280.ArduCopter
This commit is contained in:
parent
4a53c4e795
commit
343228c8cc
|
@ -131,6 +131,22 @@ erase_logs(uint8_t argc, const Menu::arg *argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
do_erase_logs(void (*delay_cb)(unsigned long))
|
||||
{
|
||||
Serial.printf_P(PSTR("\nErasing log...\n"));
|
||||
DataFlash.SetFileNumber(0xFFFF);
|
||||
for(int j = 1; j <= DF_LAST_PAGE; j++) {
|
||||
DataFlash.PageErase(j);
|
||||
DataFlash.StartWrite(j); // We need this step to clean FileNumbers
|
||||
if(j%128 == 0) Serial.printf_P(PSTR("+"));
|
||||
delay_cb(1);
|
||||
}
|
||||
|
||||
Serial.printf_P(PSTR("\nLog erased.\n"));
|
||||
DataFlash.FinishWrite();
|
||||
}
|
||||
|
||||
static int8_t
|
||||
process_logs(uint8_t argc, const Menu::arg *argv)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue