mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
EEPROM Backup/Restore problem on 9X128 (variant not used correctly)
This commit is contained in:
parent
3fe75fac59
commit
5c4b2ebd90
5 changed files with 22 additions and 14 deletions
|
@ -990,7 +990,6 @@ bool MainWindow::readFirmwareFromRadio(const QString filename)
|
|||
ad->setWindowIcon(CompanionIcon("read_flash.png"));
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1066,6 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
|
|||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
@ -1078,7 +1076,6 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
|
|||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
result = true;
|
||||
}
|
||||
|
||||
|
@ -1267,11 +1264,8 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString
|
|||
if (!flash.isValid())
|
||||
return false;
|
||||
|
||||
unsigned int version = 0;
|
||||
unsigned int variant = 0;
|
||||
|
||||
QString fwEEprom = flash.getEEprom();
|
||||
version = fwEEprom.toInt();
|
||||
unsigned int version = flash.getEEpromVersion();
|
||||
unsigned int variant = flash.getEEpromVariant();
|
||||
|
||||
QFile file(backupFile);
|
||||
int eeprom_size = file.size();
|
||||
|
@ -1333,7 +1327,7 @@ void MainWindow::writeFlash(QString fileToFlash)
|
|||
if (backupEnable) {
|
||||
QDateTime datetime;
|
||||
backupFile.clear();
|
||||
backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin";
|
||||
backupFile = backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin";
|
||||
}
|
||||
|
||||
if (readEepromFromRadio(backupFile, tr("Backup Models and Settings From Radio"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue