diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index 9429e856f..8aa4609da 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -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; } } diff --git a/radio/src/eeprom_rlc.cpp b/radio/src/eeprom_rlc.cpp index be641adaf..24b983cb5 100644 --- a/radio/src/eeprom_rlc.cpp +++ b/radio/src/eeprom_rlc.cpp @@ -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);