mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_HAL_AVR: Dataflash debugging
This commit is contained in:
parent
ff09314ab8
commit
2826a605ba
@ -21,7 +21,15 @@ void CommonDataflash::erase_all() {
|
|||||||
|
|
||||||
bool CommonDataflash::need_erase() {
|
bool CommonDataflash::need_erase() {
|
||||||
start_read(_num_pages+1);
|
start_read(_num_pages+1);
|
||||||
return (read_dword() != DF_LOGGING_FORMAT);
|
uint32_t fmtbyte = read_dword();
|
||||||
|
if (fmtbyte != DF_LOGGING_FORMAT) {
|
||||||
|
hal.console->printf_P(
|
||||||
|
PSTR("logging fmt got %lX expected %lX\r\n"),
|
||||||
|
fmtbyte, DF_LOGGING_FORMAT);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonDataflash::start_write(int16_t page) {
|
void CommonDataflash::start_write(int16_t page) {
|
||||||
|
Loading…
Reference in New Issue
Block a user