mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 09:45:21 +03:00
Fixes #1192 - Tests needed!
This commit is contained in:
parent
81c4b61322
commit
2ea687099a
3 changed files with 10 additions and 14 deletions
|
@ -438,7 +438,7 @@ void avrOutputDialog::doFinished(int code=0)
|
||||||
if (hasErrors || code) {
|
if (hasErrors || code) {
|
||||||
if (!cmdLine.isEmpty()) {
|
if (!cmdLine.isEmpty()) {
|
||||||
if (getProgrammer()!="AVRDUDE") {
|
if (getProgrammer()!="AVRDUDE") {
|
||||||
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly"));
|
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int res = QMessageBox::question(this, "Companion",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No);
|
int res = QMessageBox::question(this, "Companion",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No);
|
||||||
|
@ -446,8 +446,9 @@ void avrOutputDialog::doFinished(int code=0)
|
||||||
errorWizard();
|
errorWizard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly"));
|
else {
|
||||||
|
QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly"));
|
||||||
}
|
}
|
||||||
// reject();
|
// reject();
|
||||||
}
|
}
|
||||||
|
@ -467,8 +468,6 @@ void avrOutputDialog::doFinished(int code=0)
|
||||||
default: //AVR_DIALOG_KEEP_OPEN
|
default: //AVR_DIALOG_KEEP_OPEN
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void avrOutputDialog::doProcessStarted()
|
void avrOutputDialog::doProcessStarted()
|
||||||
|
|
|
@ -20,7 +20,7 @@ class avrOutputDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QString wTitle, int closeBehaviour=AVR_DIALOG_CLOSE_IF_SUCCESSFUL, bool displayDetails=false);
|
explicit avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QString wTitle, int closeBehaviour=AVR_DIALOG_CLOSE_IF_SUCCESSFUL, bool displayDetails=false);
|
||||||
~avrOutputDialog();
|
~avrOutputDialog();
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ public:
|
||||||
void waitForFinish();
|
void waitForFinish();
|
||||||
void addReadFuses();
|
void addReadFuses();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void doAddTextStdOut();
|
void doAddTextStdOut();
|
||||||
void doAddTextStdErr();
|
void doAddTextStdErr();
|
||||||
void doProcessStarted();
|
void doProcessStarted();
|
||||||
|
@ -41,7 +41,7 @@ protected slots:
|
||||||
void killTimerElapsed();
|
void killTimerElapsed();
|
||||||
void errorWizard();
|
void errorWizard();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString getProgrammer();
|
QString getProgrammer();
|
||||||
Ui::avrOutputDialog *ui;
|
Ui::avrOutputDialog *ui;
|
||||||
|
|
||||||
|
|
|
@ -1025,7 +1025,6 @@ bool MainWindow::writeFirmwareToRadio(const QString filename)
|
||||||
ad->setWindowIcon(CompanionIcon("write_flash.png"));
|
ad->setWindowIcon(CompanionIcon("write_flash.png"));
|
||||||
ad->exec();
|
ad->exec();
|
||||||
delete ad;
|
delete ad;
|
||||||
sleep(1);
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1113,22 +1112,20 @@ bool MainWindow::writeEepromToRadio(const QString filename, const QString messag
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
QStringList str;
|
QStringList str;
|
||||||
str << filename << path;
|
str << filename << path;
|
||||||
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message);
|
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message, AVR_DIALOG_SHOW_DONE);
|
||||||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
|
||||||
ad->exec();
|
ad->exec();
|
||||||
delete ad;
|
delete ad;
|
||||||
sleep(1);
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
|
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
|
||||||
QStringList str = GetSendEEpromCommand(filename);
|
QStringList str = GetSendEEpromCommand(filename);
|
||||||
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Backup To Radio", AVR_DIALOG_SHOW_DONE);
|
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write EEPROM To Radio", AVR_DIALOG_SHOW_DONE);
|
||||||
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
|
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
|
||||||
ad->exec();
|
ad->exec();
|
||||||
delete ad;
|
delete ad;
|
||||||
sleep(1);
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue