simu was creating too small eeprom.bin file

This commit is contained in:
Damjan Adamic
2015-07-07 20:16:55 +02:00
parent 423580c260
commit 6d5ed8409c
2 changed files with 7 additions and 1 deletions
@@ -327,7 +327,7 @@ bool OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, in
size=2048;
}
} else {
std::cout << " wrong size (" << size << ")\n";
std::cout << " wrong size (" << size << "/" << getEEpromSize() << ")\n";
return false;
}
}
+6
View File
@@ -262,6 +262,12 @@ void eepromFormat()
{
ENABLE_SYNC_WRITE(true);
#ifdef SIMU
// write zero to the end of the new EEPROM file to set it's proper size
uint8_t dummy = 0;
eepromWriteBlock(&dummy, EESIZE-1, 1);
#endif
memclear(&eeFs, sizeof(eeFs));
eeFs.version = EEFS_VERS;
eeFs.mySize = sizeof(eeFs);