Improve settings migration and management (#5107)
[opentx.git] / companion / src / fusesdialog.cpp
bloba19057d68fb79a230f74ca616d25bf0eedcb7a2c
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #include "fusesdialog.h"
22 #include "ui_fusesdialog.h"
23 #include "helpers.h"
24 #include "progressdialog.h"
25 #include "radiointerface.h"
27 FusesDialog::FusesDialog(QWidget *parent) :
28 QDialog(parent),
29 ui(new Ui::FusesDialog)
31 ui->setupUi(this);
32 setWindowIcon(CompanionIcon("fuses.png"));
35 FusesDialog::~FusesDialog()
37 delete ui;
40 void FusesDialog::on_resetFuses_EEprotect_clicked()
42 ProgressDialog progressDialog(this, tr("Reset Radio Fuses"), CompanionIcon("fuses.png"), true);
43 return resetAvrdudeFuses(true, progressDialog.progress());
46 void FusesDialog::on_resetFuses_EEdelete_clicked()
48 ProgressDialog progressDialog(this, tr("Reset Radio Fuses"), CompanionIcon("fuses.png"), true);
49 return resetAvrdudeFuses(false, progressDialog.progress());
52 void FusesDialog::on_readFuses_clicked()
54 ProgressDialog progressDialog(this, tr("Read Fuses from Radio"), CompanionIcon("fuses.png"), true);
55 return readAvrdudeFuses(progressDialog.progress());