|
|
|
@ -35,7 +35,7 @@
@@ -35,7 +35,7 @@
|
|
|
|
|
|
|
|
|
|
extern const AP_HAL::HAL &hal; |
|
|
|
|
|
|
|
|
|
#define ENABLE_DEBUG 0 |
|
|
|
|
#define ENABLE_DEBUG 1 |
|
|
|
|
|
|
|
|
|
#if ENABLE_DEBUG |
|
|
|
|
# define Debug(fmt, args ...) do {hal.console->printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0) |
|
|
|
@ -99,8 +99,6 @@ void AP_Param::erase_all(void)
@@ -99,8 +99,6 @@ void AP_Param::erase_all(void)
|
|
|
|
|
{ |
|
|
|
|
struct EEPROM_header hdr; |
|
|
|
|
|
|
|
|
|
Debug("erase_all"); |
|
|
|
|
|
|
|
|
|
// write the header
|
|
|
|
|
hdr.magic[0] = k_EEPROM_magic0; |
|
|
|
|
hdr.magic[1] = k_EEPROM_magic1; |
|
|
|
@ -218,8 +216,6 @@ bool AP_Param::setup(void)
@@ -218,8 +216,6 @@ bool AP_Param::setup(void)
|
|
|
|
|
{ |
|
|
|
|
struct EEPROM_header hdr; |
|
|
|
|
|
|
|
|
|
Debug("setup %u vars", (unsigned)_num_vars); |
|
|
|
|
|
|
|
|
|
// check the header
|
|
|
|
|
_storage.read_block(&hdr, 0, sizeof(hdr)); |
|
|
|
|
if (hdr.magic[0] != k_EEPROM_magic0 || |
|
|
|
|