Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5e5124b1
Commit
5e5124b1
authored
Feb 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More UI re-work plus warnings messages
parent
e52a8e54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
61 deletions
+56
-61
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+35
-61
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+21
-0
No files found.
src/VehicleSetup/FirmwareUpgrade.qml
View file @
5e5124b1
...
...
@@ -36,70 +36,44 @@ Rectangle {
width
:
10
}
/*
FIXME: Leaving this in here for now for possible text usage in ui that does better job of describing firmware version
_ui->statusLog->setText(tr("WARNING: BETA FIRMWARE\n"
- "This firmware version is ONLY intended for beta testers. "
- "Although it has received FLIGHT TESTING, it represents actively changed code. Do NOT use for normal operation.\n\n"
- SELECT_FIRMWARE_LICENSE));
- break;
-
- case 2:
- _ui->statusLog->setText(tr("WARNING: CONTINUOUS BUILD FIRMWARE\n"
- "This firmware has NOT BEEN FLIGHT TESTED. "
- "It is only intended for DEVELOPERS. Run bench tests without props first. "
- "Do NOT fly this without addional safety precautions. Follow the mailing "
- "list actively when using it.\n\n"
- SELECT_FIRMWARE_LICENSE));
*/
ExclusiveGroup
{
id
:
firmwareGroup
}
QGCRadioButton
{
id
:
stableFirwareRadio
exclusiveGroup
:
firmwareGroup
text
:
qsTr
(
"
Standard Version (stable)
"
)
checked
:
true
enabled
:
upgradeButton
.
enabled
onClicked
:
{
if
(
checked
)
controller
.
firmwareType
=
FirmwareUpgradeController
.
StableFirmware
Row
{
spacing
:
10
ListModel
{
id
:
firmwareItems
ListElement
{
text
:
qsTr
(
"
Standard Version (stable)
"
);
firmwareType
:
FirmwareUpgradeController
.
StableFirmware
}
ListElement
{
text
:
qsTr
(
"
Beta Testing (beta)
"
);
firmwareType
:
FirmwareUpgradeController
.
BetaFirmware
}
ListElement
{
text
:
qsTr
(
"
Developer Build (master)
"
);
firmwareType
:
FirmwareUpgradeController
.
DeveloperFirmware
}
ListElement
{
text
:
qsTr
(
"
Custom firmware file...
"
);
firmwareType
:
FirmwareUpgradeController
.
CustomFirmware
}
}
}
QGCRadioButton
{
id
:
betaFirwareRadio
exclusiveGroup
:
firmwareGroup
text
:
qsTr
(
"
Beta Testing (beta)
"
)
enabled
:
upgradeButton
.
enabled
onClicked
:
{
if
(
checked
)
controller
.
firmwareType
=
FirmwareUpgradeController
.
BetaFirmware
}
}
QGCRadioButton
{
id
:
devloperFirwareRadio
exclusiveGroup
:
firmwareGroup
text
:
qsTr
(
"
Developer Build (master)
"
)
enabled
:
upgradeButton
.
enabled
onClicked
:
{
if
(
checked
)
controller
.
firmwareType
=
FirmwareUpgradeController
.
DeveloperFirmware
}
}
QGCRadioButton
{
id
:
customFirwareRadio
exclusiveGroup
:
firmwareGroup
text
:
qsTr
(
"
Custom firmware file...
"
)
enabled
:
upgradeButton
.
enabled
onClicked
:
{
if
(
checked
)
controller
.
firmwareType
=
FirmwareUpgradeController
.
CustomFirmware
}
}
Item
{
// Just used as a spacer
height
:
20
width
:
10
}
QGCComboBox
{
id
:
firmwareCombo
width
:
200
height
:
upgradeButton
.
height
model
:
firmwareItems
}
QGCButton
{
id
:
upgradeButton
text
:
"
UPGRADE
"
onClicked
:
{
controller
.
doFirmwareUpgrade
();
QGCButton
{
id
:
upgradeButton
text
:
"
UPGRADE
"
primary
:
true
onClicked
:
{
controller
.
firmwareType
=
firmwareItems
.
get
(
firmwareCombo
.
currentIndex
).
firmwareType
controller
.
doFirmwareUpgrade
();
}
}
}
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
5e5124b1
...
...
@@ -580,6 +580,27 @@ void FirmwareUpgradeController::_eraseProgressTick(void)
void
FirmwareUpgradeController
::
doFirmwareUpgrade
(
void
)
{
QString
warningMsg
;
if
(
_firmwareType
==
BetaFirmware
)
{
warningMsg
=
tr
(
"WARNING: BETA FIRMWARE
\n
"
"This firmware version is ONLY intended for beta testers. "
"Although it has received FLIGHT TESTING, it represents actively changed code. Do NOT use for normal operation.
\n\n
"
"Are you sure you want to continue?"
);
}
else
if
(
_firmwareType
==
DeveloperFirmware
)
{
warningMsg
=
tr
(
"WARNING: CONTINUOUS BUILD FIRMWARE
\n
"
"This firmware has NOT BEEN FLIGHT TESTED. "
"It is only intended for DEVELOPERS. Run bench tests without props first. "
"Do NOT fly this without addional safety precautions. Follow the mailing "
"list actively when using it.
\n\n
"
"Are you sure you want to continue?"
);
}
if
(
!
warningMsg
.
isEmpty
())
{
if
(
QGCMessageBox
::
warning
(
tr
(
"Firmware Upgrade"
),
warningMsg
,
QGCMessageBox
::
Yes
|
QGCMessageBox
::
No
,
QGCMessageBox
::
No
)
==
QGCMessageBox
::
No
)
{
return
;
}
}
Q_ASSERT
(
_upgradeButton
);
_upgradeButton
->
setEnabled
(
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment