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
d71ceca6
Commit
d71ceca6
authored
Jul 19, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
0783e815
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+7
-18
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+5
-2
No files found.
src/VehicleSetup/FirmwareUpgrade.qml
View file @
d71ceca6
...
@@ -123,35 +123,25 @@ SetupPage {
...
@@ -123,35 +123,25 @@ SetupPage {
statusTextArea
.
append
(
qgcUnplugText2
)
statusTextArea
.
append
(
qgcUnplugText2
)
var
availableDevices
=
controller
.
availableBoardsName
()
var
availableDevices
=
controller
.
availableBoardsName
()
if
(
availableDevices
.
length
>
1
)
{
if
(
availableDevices
.
length
>
1
)
{
statusTextArea
.
append
(
highlightPrefix
+
qsTr
(
"
Multiple devices detected! Remove all detected devices to perform the firmware upgrade.
"
))
statusTextArea
.
append
(
highlightPrefix
+
qsTr
(
"
Multiple devices detected! Remove all detected devices to perform the firmware upgrade.
"
))
statusTextArea
.
append
(
qsTr
(
"
Detected [%1]:
"
).
arg
(
availableDevices
.
length
)
+
availableDevices
.
join
(
"
,
"
))
statusTextArea
.
append
(
qsTr
(
"
Detected [%1]:
"
).
arg
(
availableDevices
.
length
)
+
availableDevices
.
join
(
"
,
"
))
}
}
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
)
{
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autoDisconnect
=
true
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autoDisconnect
=
true
}
}
}
else
{
}
else
{
// We end up here when we detect a board plugged in after we've started upgrade
// We end up here when we detect a board plugged in after we've started upgrade
statusTextArea
.
append
(
highlightPrefix
+
qsTr
(
"
Found device
"
)
+
highlightSuffix
+
"
:
"
+
controller
.
boardType
)
statusTextArea
.
append
(
highlightPrefix
+
qsTr
(
"
Found device
"
)
+
highlightSuffix
+
"
:
"
+
controller
.
boardType
)
if
(
controller
.
px4FlowBoard
)
{
mainWindow
.
showComponentDialog
(
pixhawkFirmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
}
}
onBootloaderFound
:
{
onBootloaderFound
:
mainWindow
.
showComponentDialog
(
firmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
if
(
controller
.
pixhawkBoard
)
{
onError
:
statusTextArea
.
append
(
flashFailText
)
mainWindow
.
showComponentDialog
(
pixhawkFirmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
onError
:
{
statusTextArea
.
append
(
flashFailText
)
}
}
}
Component
{
Component
{
id
:
pixhawkF
irmwareSelectDialogComponent
id
:
f
irmwareSelectDialogComponent
QGCViewDialog
{
QGCViewDialog
{
id
:
pixhawkFirmwareSelectDialog
id
:
pixhawkFirmwareSelectDialog
...
@@ -463,7 +453,6 @@ SetupPage {
...
@@ -463,7 +453,6 @@ SetupPage {
visible
:
showFirmwareTypeSelection
visible
:
showFirmwareTypeSelection
textRole
:
"
text
"
textRole
:
"
text
"
model
:
_singleFirmwareMode
?
singleFirmwareModeTypeList
:
(
px4Flow
?
px4FlowTypeList
:
firmwareBuildTypeList
)
model
:
_singleFirmwareMode
?
singleFirmwareModeTypeList
:
(
px4Flow
?
px4FlowTypeList
:
firmwareBuildTypeList
)
currentIndex
:
controller
.
selectedFirmwareBuildType
onActivated
:
{
onActivated
:
{
controller
.
selectedFirmwareBuildType
=
model
.
get
(
index
).
firmwareType
controller
.
selectedFirmwareBuildType
=
model
.
get
(
index
).
firmwareType
...
@@ -480,7 +469,7 @@ SetupPage {
...
@@ -480,7 +469,7 @@ SetupPage {
qsTr
(
"
It is only intended for DEVELOPERS.
"
)
+
qsTr
(
"
It is only intended for DEVELOPERS.
"
)
+
qsTr
(
"
Run bench tests without props first.
"
)
+
qsTr
(
"
Run bench tests without props first.
"
)
+
qsTr
(
"
Do NOT fly this without additional safety precautions.
"
)
+
qsTr
(
"
Do NOT fly this without additional safety precautions.
"
)
+
qsTr
(
"
Follow the
mailing list
actively when using it.
"
)
qsTr
(
"
Follow the
forums
actively when using it.
"
)
}
else
{
}
else
{
firmwareWarningMessageVisible
=
false
firmwareWarningMessageVisible
=
false
}
}
...
@@ -497,7 +486,7 @@ SetupPage {
...
@@ -497,7 +486,7 @@ SetupPage {
}
// Column
}
// Column
}
// QGCFLickable
}
// QGCFLickable
}
// QGCViewDialog
}
// QGCViewDialog
}
// Component -
pixhawkF
irmwareSelectDialogComponent
}
// Component -
f
irmwareSelectDialogComponent
Component
{
Component
{
id
:
firmwareWarningDialog
id
:
firmwareWarningDialog
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
d71ceca6
...
@@ -62,7 +62,7 @@ FirmwareUpgradeController::FirmwareUpgradeController(void)
...
@@ -62,7 +62,7 @@ FirmwareUpgradeController::FirmwareUpgradeController(void)
,
_downloadManager
(
nullptr
)
,
_downloadManager
(
nullptr
)
,
_downloadNetworkReply
(
nullptr
)
,
_downloadNetworkReply
(
nullptr
)
,
_statusLog
(
nullptr
)
,
_statusLog
(
nullptr
)
,
_selectedFirmwareBuildType
(
StableFirmware
)
,
_selectedFirmwareBuildType
(
StableFirmware
)
,
_image
(
nullptr
)
,
_image
(
nullptr
)
,
_apmBoardDescriptionReplaceText
(
"<APMBoardDescription>"
)
,
_apmBoardDescriptionReplaceText
(
"<APMBoardDescription>"
)
,
_apmChibiOSSetting
(
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
firmwareUpgradeSettings
()
->
apmChibiOS
())
,
_apmChibiOSSetting
(
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
firmwareUpgradeSettings
()
->
apmChibiOS
())
...
@@ -738,7 +738,6 @@ void FirmwareUpgradeController::setSelectedFirmwareBuildType(FirmwareBuildType_t
...
@@ -738,7 +738,6 @@ void FirmwareUpgradeController::setSelectedFirmwareBuildType(FirmwareBuildType_t
void
FirmwareUpgradeController
::
_buildAPMFirmwareNames
(
void
)
void
FirmwareUpgradeController
::
_buildAPMFirmwareNames
(
void
)
{
{
#if !defined(NO_ARDUPILOT_DIALECT)
#if !defined(NO_ARDUPILOT_DIALECT)
bool
chibios
=
_apmChibiOSSetting
->
rawValue
().
toInt
()
==
0
;
bool
chibios
=
_apmChibiOSSetting
->
rawValue
().
toInt
()
==
0
;
FirmwareVehicleType_t
vehicleType
=
static_cast
<
FirmwareVehicleType_t
>
(
_apmVehicleTypeSetting
->
rawValue
().
toInt
());
FirmwareVehicleType_t
vehicleType
=
static_cast
<
FirmwareVehicleType_t
>
(
_apmVehicleTypeSetting
->
rawValue
().
toInt
());
QString
boardDescription
=
_boardInfo
.
description
();
QString
boardDescription
=
_boardInfo
.
description
();
...
@@ -746,6 +745,10 @@ void FirmwareUpgradeController::_buildAPMFirmwareNames(void)
...
@@ -746,6 +745,10 @@ void FirmwareUpgradeController::_buildAPMFirmwareNames(void)
quint16
boardPID
=
_boardInfo
.
productIdentifier
();
quint16
boardPID
=
_boardInfo
.
productIdentifier
();
uint32_t
rawBoardId
=
_bootloaderBoardID
==
Bootloader
::
boardIDPX4FMUV3
?
Bootloader
::
boardIDPX4FMUV2
:
_bootloaderBoardID
;
uint32_t
rawBoardId
=
_bootloaderBoardID
==
Bootloader
::
boardIDPX4FMUV3
?
Bootloader
::
boardIDPX4FMUV2
:
_bootloaderBoardID
;
if
(
_boardType
==
QGCSerialPortInfo
::
BoardTypePX4Flow
)
{
return
;
}
qCDebug
(
FirmwareUpgradeLog
)
<<
QStringLiteral
(
"_buildAPMFirmwareNames description(%1) vid(%2/0x%3) pid(%4/0x%5)"
).
arg
(
boardDescription
).
arg
(
boardVID
).
arg
(
boardVID
,
1
,
16
).
arg
(
boardPID
).
arg
(
boardPID
,
1
,
16
);
qCDebug
(
FirmwareUpgradeLog
)
<<
QStringLiteral
(
"_buildAPMFirmwareNames description(%1) vid(%2/0x%3) pid(%4/0x%5)"
).
arg
(
boardDescription
).
arg
(
boardVID
).
arg
(
boardVID
,
1
,
16
).
arg
(
boardPID
).
arg
(
boardPID
,
1
,
16
);
_apmFirmwareNames
.
clear
();
_apmFirmwareNames
.
clear
();
...
...
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