[Companion] dfu-util launched with right args for Horus

This commit is contained in:
Bertrand Songis
2016-03-17 21:04:09 +01:00
parent a2db3f2150
commit 662137aa6d
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ fwName(g.profile[g.id()].fwName())
ui->useProfileSplash->setDisabled(true); ui->useProfileSplash->setDisabled(true);
} }
if (IS_TARANIS(GetEepromInterface()->getBoard())) { if (IS_STM32(GetEepromInterface()->getBoard())) {
// No backup on Taranis ... could be done if in massstorage // No backup on Taranis ... could be done if in massstorage
ui->backupEEprom->hide(); ui->backupEEprom->hide();
ui->backupEEprom->setCheckState(Qt::Unchecked); ui->backupEEprom->setCheckState(Qt::Unchecked);
+4 -4
View File
@@ -102,7 +102,7 @@ QStringList getReadEEpromCmd(const QString &filename)
{ {
QStringList result; QStringList result;
EEPROMInterface *eepromInterface = GetEepromInterface(); EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_TARANIS(eepromInterface->getBoard())) { if (IS_STM32(eepromInterface->getBoard())) {
// impossible // impossible
} }
else if (IS_SKY9X(eepromInterface->getBoard())) { else if (IS_SKY9X(eepromInterface->getBoard())) {
@@ -117,7 +117,7 @@ QStringList getReadEEpromCmd(const QString &filename)
QStringList getWriteEEpromCmd(const QString &filename) QStringList getWriteEEpromCmd(const QString &filename)
{ {
EEPROMInterface *eepromInterface = GetEepromInterface(); EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_TARANIS(eepromInterface->getBoard())) { if (IS_STM32(eepromInterface->getBoard())) {
// impossible // impossible
return QStringList(); return QStringList();
} }
@@ -132,7 +132,7 @@ QStringList getWriteEEpromCmd(const QString &filename)
QStringList getWriteFirmwareArgs(const QString &filename) QStringList getWriteFirmwareArgs(const QString &filename)
{ {
EEPROMInterface *eepromInterface = GetEepromInterface(); EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_TARANIS(eepromInterface->getBoard())) { if (IS_STM32(eepromInterface->getBoard())) {
return getDfuArgs("-D", filename); return getDfuArgs("-D", filename);
} }
else if (eepromInterface->getBoard() == BOARD_SKY9X) { else if (eepromInterface->getBoard() == BOARD_SKY9X) {
@@ -313,7 +313,7 @@ bool readEeprom(const QString &filename, ProgressWidget *progress)
} }
} }
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) { if (result == false && !IS_STM32(GetCurrentFirmware()->getBoard())) {
FlashProcess flashProcess(getRadioInterfaceCmd(), getReadEEpromCmd(filename), progress); FlashProcess flashProcess(getRadioInterfaceCmd(), getReadEEpromCmd(filename), progress);
result = flashProcess.run(); result = flashProcess.run();
} }