[Companion] Fixes
This commit is contained in:
@@ -49,9 +49,9 @@ bool BinEepromFormat::load(RadioData & radioData)
|
||||
bool BinEepromFormat::write(const RadioData & radioData)
|
||||
{
|
||||
bool result;
|
||||
EEPROMInterface * eepromInterface = GetEepromInterface();
|
||||
EEPROMInterface * eepromInterface = getCurrentEEpromInterface();
|
||||
uint8_t * eeprom = (uint8_t *)malloc(getEEpromSize(eepromInterface->getBoard()));
|
||||
int eeprom_size = eepromInterface->save(eeprom, radioData, 0, GetCurrentFirmware()->getVariantNumber());
|
||||
int eeprom_size = eepromInterface->save(eeprom, radioData, 0, getCurrentFirmware()->getVariantNumber());
|
||||
if (eeprom_size) {
|
||||
result = writeToFile(eeprom, eeprom_size);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ bool Storage::write(const RadioData & radioData)
|
||||
|
||||
bool convertEEprom(const QString & sourceEEprom, const QString & destinationEEprom, const QString & firmwareFilename)
|
||||
{
|
||||
Firmware * currentFirmware = GetCurrentFirmware();
|
||||
FirmwareInterface firmware(firmwareFilename);
|
||||
if (!firmware.isValid())
|
||||
return false;
|
||||
@@ -112,7 +111,7 @@ bool convertEEprom(const QString & sourceEEprom, const QString & destinationEEpr
|
||||
return false;
|
||||
|
||||
QByteArray eeprom(EESIZE_MAX, 0);
|
||||
int size = currentFirmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, version, variant);
|
||||
int size = getCurrentEEpromInterface()->save((uint8_t *)eeprom.data(), *radioData, version, variant);
|
||||
if (size == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user