Bsongis/companion warning before automatic conversions (#4271)

* Does this work?

* Warning before automatic conversions
This commit is contained in:
Bertrand Songis
2017-01-22 15:31:22 +01:00
committed by GitHub
parent 7a60714071
commit 285b8786b9
11 changed files with 64 additions and 29 deletions
+6 -1
View File
@@ -50,7 +50,11 @@ bool BinEepromFormat::write(const RadioData & radioData)
{
bool result;
EEPROMInterface * eepromInterface = getCurrentEEpromInterface();
uint8_t * eeprom = (uint8_t *)malloc(getEEpromSize(eepromInterface->getBoard()));
int size = getEEpromSize(eepromInterface->getBoard());
if (size == 0) {
return false;
}
uint8_t * eeprom = (uint8_t *)malloc(size);
int eeprom_size = eepromInterface->save(eeprom, radioData, 0, getCurrentFirmware()->getVariantNumber());
if (eeprom_size) {
result = writeToFile(eeprom, eeprom_size);
@@ -91,6 +95,7 @@ bool BinEepromFormat::extract(RadioData & radioData, const QByteArray & eeprom)
if (errors.test(HAS_WARNINGS)) {
// TODO ShowEepromWarnings(this, QObject::tr("Warning"), errors.to_ulong());
}
board = eepromInterface->getBoard();
return true;
}
else {