Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
9b919900
Unverified
Commit
9b919900
authored
Jul 25, 2020
by
Don Gagne
Committed by
GitHub
Jul 25, 2020
Browse files
Merge pull request #8927 from DonLakeFlyer/FlowCustomFlash
Fix Flow custom flash
parents
2fb02111
d71ceca6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/VehicleSetup/FirmwareUpgrade.qml
View file @
9b919900
...
...
@@ -123,35 +123,25 @@ SetupPage {
statusTextArea
.
append
(
qgcUnplugText2
)
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
(
qsTr
(
"
Detected [%1]:
"
).
arg
(
availableDevices
.
length
)
+
availableDevices
.
join
(
"
,
"
))
}
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
)
{
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autoDisconnect
=
true
}
}
else
{
// 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
)
if
(
controller
.
px4FlowBoard
)
{
mainWindow
.
showComponentDialog
(
pixhawkFirmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
onBootloaderFound
:
{
if
(
controller
.
pixhawkBoard
)
{
mainWindow
.
showComponentDialog
(
pixhawkFirmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
onError
:
{
statusTextArea
.
append
(
flashFailText
)
}
onBootloaderFound
:
mainWindow
.
showComponentDialog
(
firmwareSelectDialogComponent
,
title
,
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
onError
:
statusTextArea
.
append
(
flashFailText
)
}
Component
{
id
:
pixhawkF
irmwareSelectDialogComponent
id
:
f
irmwareSelectDialogComponent
QGCViewDialog
{
id
:
pixhawkFirmwareSelectDialog
...
...
@@ -463,7 +453,6 @@ SetupPage {
visible
:
showFirmwareTypeSelection
textRole
:
"
text
"
model
:
_singleFirmwareMode
?
singleFirmwareModeTypeList
:
(
px4Flow
?
px4FlowTypeList
:
firmwareBuildTypeList
)
currentIndex
:
controller
.
selectedFirmwareBuildType
onActivated
:
{
controller
.
selectedFirmwareBuildType
=
model
.
get
(
index
).
firmwareType
...
...
@@ -480,7 +469,7 @@ SetupPage {
qsTr
(
"
It is only intended for DEVELOPERS.
"
)
+
qsTr
(
"
Run bench tests without props first.
"
)
+
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
{
firmwareWarningMessageVisible
=
false
}
...
...
@@ -497,7 +486,7 @@ SetupPage {
}
// Column
}
// QGCFLickable
}
// QGCViewDialog
}
// Component -
pixhawkF
irmwareSelectDialogComponent
}
// Component -
f
irmwareSelectDialogComponent
Component
{
id
:
firmwareWarningDialog
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
9b919900
...
...
@@ -62,7 +62,7 @@ FirmwareUpgradeController::FirmwareUpgradeController(void)
,
_downloadManager
(
nullptr
)
,
_downloadNetworkReply
(
nullptr
)
,
_statusLog
(
nullptr
)
,
_selectedFirmwareBuildType
(
StableFirmware
)
,
_selectedFirmwareBuildType
(
StableFirmware
)
,
_image
(
nullptr
)
,
_apmBoardDescriptionReplaceText
(
"<APMBoardDescription>"
)
,
_apmChibiOSSetting
(
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
firmwareUpgradeSettings
()
->
apmChibiOS
())
...
...
@@ -755,7 +755,6 @@ void FirmwareUpgradeController::setSelectedFirmwareBuildType(FirmwareBuildType_t
void
FirmwareUpgradeController
::
_buildAPMFirmwareNames
(
void
)
{
#if !defined(NO_ARDUPILOT_DIALECT)
bool
chibios
=
_apmChibiOSSetting
->
rawValue
().
toInt
()
==
0
;
FirmwareVehicleType_t
vehicleType
=
static_cast
<
FirmwareVehicleType_t
>
(
_apmVehicleTypeSetting
->
rawValue
().
toInt
());
QString
boardDescription
=
_boardInfo
.
description
();
...
...
@@ -763,6 +762,10 @@ void FirmwareUpgradeController::_buildAPMFirmwareNames(void)
quint16
boardPID
=
_boardInfo
.
productIdentifier
();
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
);
_apmFirmwareNames
.
clear
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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