Browse Source

Log_simple uses identical implementation of do_erase_logs.

* fix build1280.ArduCopter
mission-4.1.18
Pat Hickey 13 years ago
parent
commit
c40fccbc26
  1. 16
      ArduCopter/Log_simple.pde

16
ArduCopter/Log_simple.pde

@ -131,6 +131,22 @@ erase_logs(uint8_t argc, const Menu::arg *argv) @@ -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…
Cancel
Save