debugging
This commit is contained in:
@ -112,6 +112,7 @@ static void eepromHourlyUpdateDeviceStats(void *handle) {
|
|||||||
void eepromInit() {
|
void eepromInit() {
|
||||||
logMsg("eeI, read header");
|
logMsg("eeI, read header");
|
||||||
eepromRead(EEPROM_HEADER_ADDR, eepromHeader.b, sizeof(eepromHeader));
|
eepromRead(EEPROM_HEADER_ADDR, eepromHeader.b, sizeof(eepromHeader));
|
||||||
|
coloredMsg(LOG_RED, "eeI, magic: %08x", eepromHeader.s.magic);
|
||||||
|
|
||||||
if (eepromHeader.s.magic != EEPROM_MAGIC) {
|
if (eepromHeader.s.magic != EEPROM_MAGIC) {
|
||||||
coloredMsg(LOG_RED, "eeI, eeprom is uninitialized");
|
coloredMsg(LOG_RED, "eeI, eeprom is uninitialized");
|
||||||
@ -123,6 +124,7 @@ void eepromInit() {
|
|||||||
coloredMsg(LOG_RED, "eeI, about to write device stats for the first time");
|
coloredMsg(LOG_RED, "eeI, about to write device stats for the first time");
|
||||||
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));
|
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));
|
||||||
|
|
||||||
|
/*
|
||||||
uint8_t emptyBlock[32];
|
uint8_t emptyBlock[32];
|
||||||
memset(emptyBlock, 0, sizeof(emptyBlock));
|
memset(emptyBlock, 0, sizeof(emptyBlock));
|
||||||
for (uint8_t i = 0; i < 2; i++) {
|
for (uint8_t i = 0; i < 2; i++) {
|
||||||
@ -132,6 +134,7 @@ void eepromInit() {
|
|||||||
eepromWrite(addr, emptyBlock, sizeof(emptyBlock));
|
eepromWrite(addr, emptyBlock, sizeof(emptyBlock));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
eepromHeader.s.magic = EEPROM_MAGIC;
|
eepromHeader.s.magic = EEPROM_MAGIC;
|
||||||
eepromHeader.s.activeBlock = 0;
|
eepromHeader.s.activeBlock = 0;
|
||||||
|
Reference in New Issue
Block a user