debugging
This commit is contained in:
@ -112,6 +112,7 @@ static void eepromHourlyUpdateDeviceStats(void *handle) {
|
||||
void eepromInit() {
|
||||
logMsg("eeI, read header");
|
||||
eepromRead(EEPROM_HEADER_ADDR, eepromHeader.b, sizeof(eepromHeader));
|
||||
coloredMsg(LOG_RED, "eeI, magic: %08x", eepromHeader.s.magic);
|
||||
|
||||
if (eepromHeader.s.magic != EEPROM_MAGIC) {
|
||||
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");
|
||||
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));
|
||||
|
||||
/*
|
||||
uint8_t emptyBlock[32];
|
||||
memset(emptyBlock, 0, sizeof(emptyBlock));
|
||||
for (uint8_t i = 0; i < 2; i++) {
|
||||
@ -132,6 +134,7 @@ void eepromInit() {
|
||||
eepromWrite(addr, emptyBlock, sizeof(emptyBlock));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
eepromHeader.s.magic = EEPROM_MAGIC;
|
||||
eepromHeader.s.activeBlock = 0;
|
||||
@ -156,4 +159,4 @@ void eepromInit() {
|
||||
|
||||
schAdd(eepromHourlyUpdateDeviceStats, NULL, 0, 60 * 1000);
|
||||
coloredMsg(LOG_GREEN, "eeI, hourly device stats update scheduled");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user