XLite EEPROM 218 import fix
This commit is contained in:
@@ -136,7 +136,7 @@ bool OpenTxEepromInterface::saveToByteArray(const T & src, QByteArray & data, ui
|
||||
QByteArray raw;
|
||||
T srcCopy(src); // work on a copy of radio data, because Export() will modify it!
|
||||
M manager(srcCopy, board, version, 0);
|
||||
// manager.Dump();
|
||||
// manager.dump();
|
||||
manager.Export(raw);
|
||||
data.resize(8);
|
||||
*((uint32_t*)&data.data()[0]) = Boards::getFourCC(board);
|
||||
@@ -154,7 +154,7 @@ bool OpenTxEepromInterface::loadFromByteArray(T & dest, const QByteArray & data,
|
||||
if (manager.Import(data) != 0) {
|
||||
return false;
|
||||
}
|
||||
// manager.Dump(); // Dumps the structure so that it's easy to check with firmware datastructs.h
|
||||
// manager.dump(); // Dumps the structure so that it's easy to check with firmware datastructs.h
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ int OpenTxEepromInterface::save(uint8_t * eeprom, const RadioData & radioData, u
|
||||
}
|
||||
|
||||
OpenTxGeneralData generator((GeneralSettings &)radioData.generalSettings, board, version, variant);
|
||||
// generator.Dump();
|
||||
// generator.dump();
|
||||
QByteArray data;
|
||||
generator.Export(data);
|
||||
int sz = efile->writeRlc2(FILE_GENERAL, FILE_TYP_GENERAL, (const uint8_t *)data.constData(), data.size());
|
||||
@@ -345,7 +345,7 @@ int OpenTxEepromInterface::save(uint8_t * eeprom, const RadioData & radioData, u
|
||||
for (int i = 0; i < getCurrentFirmware()->getCapability(Models); i++) {
|
||||
if (i < (int)radioData.models.size() && !radioData.models[i].isEmpty()) {
|
||||
OpenTxModelData generator((ModelData &)radioData.models[i], board, version, variant);
|
||||
// generator.Dump();
|
||||
// generator.dump();
|
||||
QByteArray data;
|
||||
generator.Export(data);
|
||||
int sz = efile->writeRlc2(FILE_MODEL(i), FILE_TYP_MODEL, (const uint8_t *)data.constData(), data.size());
|
||||
@@ -392,7 +392,7 @@ int OpenTxEepromInterface::getSize(const GeneralSettings &settings)
|
||||
|
||||
GeneralSettings srcCopy(settings); // work on a copy of settings data, because Export() may modify it!
|
||||
OpenTxGeneralData open9xGeneral(srcCopy, board, 255, getCurrentFirmware()->getVariantNumber());
|
||||
// open9xGeneral.Dump();
|
||||
// open9xGeneral.dump();
|
||||
|
||||
QByteArray eeprom;
|
||||
open9xGeneral.Export(eeprom);
|
||||
|
||||
Reference in New Issue
Block a user