Log: don't print '+' while erasing logs

we no longer do page based erase, so printing a + every 128 pages
makes no sense
This commit is contained in:
Andrew Tridgell 2012-05-23 13:07:53 +10:00 committed by Craig Elder
parent c2fb8a7a98
commit 5b5d43f5d0
2 changed files with 2 additions and 17 deletions

View File

@ -150,17 +150,10 @@ dump_log(uint8_t argc, const Menu::arg *argv)
return (0);
}
void erase_callback(unsigned long t) {
mavlink_delay(t);
if (DataFlash.GetWritePage() % 128 == 0) {
gcs_send_text_P(SEVERITY_LOW, PSTR("+"));
}
}
static void do_erase_logs(void)
{
gcs_send_text_P(SEVERITY_LOW, PSTR("Erasing logs"));
DataFlash.EraseAll(erase_callback);
DataFlash.EraseAll(mavlink_delay);
gcs_send_text_P(SEVERITY_LOW, PSTR("Log erase complete"));
}

View File

@ -140,18 +140,10 @@ dump_log(uint8_t argc, const Menu::arg *argv)
return 0;
}
void erase_callback(unsigned long t) {
mavlink_delay(t);
if (DataFlash.GetWritePage() % 128 == 0) {
gcs_send_text_P(SEVERITY_LOW, PSTR("+"));
}
}
static void do_erase_logs(void)
{
gcs_send_text_P(SEVERITY_LOW, PSTR("Erasing logs"));
DataFlash.EraseAll(erase_callback);
DataFlash.EraseAll(mavlink_delay);
gcs_send_text_P(SEVERITY_LOW, PSTR("Log erase complete"));
}