simu was creating too small eeprom.bin file
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user