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
8e5edf40
Unverified
Commit
8e5edf40
authored
May 29, 2018
by
Don Gagne
Committed by
GitHub
May 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6525 from DonLakeFlyer/FirmwareFlash
Firmware Upgrade: Make default firmware more prominent
parents
4d57dbcc
70b21bf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
12 deletions
+27
-12
QGCRadioButton.qml
src/QmlControls/QGCRadioButton.qml
+2
-0
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+25
-12
No files found.
src/QmlControls/QGCRadioButton.qml
View file @
8e5edf40
...
...
@@ -9,6 +9,7 @@ RadioButton {
property
var
color
:
qgcPal
.
text
///< Text color
property
int
textStyle
:
Text
.
Normal
property
color
textStyleColor
:
qgcPal
.
text
property
bool
textBold
:
false
property
var
qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
style
:
RadioButtonStyle
{
...
...
@@ -35,6 +36,7 @@ RadioButton {
text
:
control
.
text
font.pointSize
:
ScreenTools
.
defaultFontPointSize
font.family
:
ScreenTools
.
normalFontFamily
font.bold
:
control
.
textBold
antialiasing
:
true
color
:
control
.
color
style
:
control
.
textStyle
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
8e5edf40
...
...
@@ -56,7 +56,7 @@ SetupPage {
readonly
property
int
_defaultFimwareTypeAPM
:
3
property
var
_defaultFirmwareFact
:
QGroundControl
.
settingsManager
.
appSettings
.
defaultFirmwareType
property
bool
_defaultFirmwareIsPX4
:
_defaultFirmwareFact
.
rawValue
===
_defaultFimwareTypePX4
property
bool
_defaultFirmwareIsPX4
:
true
property
string
firmwareWarningMessage
property
bool
controllerCompleted
:
false
...
...
@@ -134,6 +134,7 @@ SetupPage {
// We can only start the board search when the Qml and Controller are completely done loading
controller
.
startBoardSearch
()
}
_defaultFirmwareIsPX4
=
_defaultFirmwareFact
.
rawValue
===
_defaultFimwareTypePX4
// we don't want this to be bound and change as radios are selected
}
Component
{
...
...
@@ -160,7 +161,8 @@ SetupPage {
}
else
{
versionString
=
controller
.
px4StableVersion
}
px4FlightStack
.
text
=
qsTr
(
"
PX4 Flight Stack
"
)
+
versionString
px4FlightStackRadio1
.
text
=
qsTr
(
"
PX4 Flight Stack
"
)
+
versionString
px4FlightStackRadio2
.
text
=
qsTr
(
"
PX4 Flight Stack
"
)
+
versionString
}
Component.onCompleted
:
updatePX4VersionDisplay
()
...
...
@@ -282,19 +284,16 @@ SetupPage {
firmwareVersionCombo
.
currentIndex
=
0
}
Component.onCompleted
:
{
if
(
_defaultFirmwareIsPX4
)
{
px4FlightStack
.
checked
=
true
}
else
{
apmFlightStack
.
checked
=
true
}
}
// The following craziness of three radio buttons to represent two radio buttons is so that the
// order can be changed such that the default firmware button is always on the top
QGCRadioButton
{
id
:
px4FlightStack
exclusiveGroup
:
firmwareGroup
id
:
px4FlightStack
Radio1
exclusiveGroup
:
_defaultFirmwareIsPX4
?
firmwareGroup
:
null
text
:
qsTr
(
"
PX4 Flight Stack
"
)
visible
:
!
_singleFirmwareMode
&&
!
px4Flow
textBold
:
_defaultFirmwareIsPX4
checked
:
_defaultFirmwareIsPX4
visible
:
_defaultFirmwareIsPX4
&&
!
_singleFirmwareMode
&&
!
px4Flow
onClicked
:
{
_defaultFirmwareFact
.
rawValue
=
_defaultFimwareTypePX4
...
...
@@ -306,6 +305,8 @@ SetupPage {
id
:
apmFlightStack
exclusiveGroup
:
firmwareGroup
text
:
qsTr
(
"
ArduPilot Flight Stack
"
)
textBold
:
!
_defaultFirmwareIsPX4
checked
:
!
_defaultFirmwareIsPX4
visible
:
!
_singleFirmwareMode
&&
!
px4Flow
onClicked
:
{
...
...
@@ -314,6 +315,18 @@ SetupPage {
}
}
QGCRadioButton
{
id
:
px4FlightStackRadio2
exclusiveGroup
:
_defaultFirmwareIsPX4
?
null
:
firmwareGroup
text
:
qsTr
(
"
PX4 Flight Stack
"
)
visible
:
!
_defaultFirmwareIsPX4
&&
!
_singleFirmwareMode
&&
!
px4Flow
onClicked
:
{
_defaultFirmwareFact
.
rawValue
=
_defaultFimwareTypePX4
parent
.
firmwareVersionChanged
(
firmwareTypeList
)
}
}
QGCComboBox
{
id
:
vehicleTypeSelectionCombo
anchors.left
:
parent
.
left
...
...
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