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
da3191c3
Commit
da3191c3
authored
Nov 21, 2015
by
Lorenz Meier
Browse files
Add support for v4 boards
parent
070a77b1
Changes
3
Show whitespace changes
Inline
Side-by-side
src/VehicleSetup/Bootloader.h
View file @
da3191c3
...
...
@@ -76,6 +76,7 @@ public:
// Supported bootloader board ids
static
const
int
boardIDPX4FMUV1
=
5
;
///< PX4 V1 board
static
const
int
boardIDPX4FMUV2
=
9
;
///< PX4 V2 board
static
const
int
boardIDPX4FMUV4
=
11
;
///< PX4 V4 board
static
const
int
boardIDPX4Flow
=
6
;
///< PX4 Flow board
static
const
int
boardIDAeroCore
=
98
;
///< Gumstix AeroCore board
static
const
int
boardID3DRRadio
=
78
;
///< 3DR Radio
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
da3191c3
...
...
@@ -187,6 +187,13 @@ void FirmwareUpgradeController::_initFirmwareHash()
return
;
}
//////////////////////////////////// PX4FMUV4 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FMV4FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/px4fmu-v4_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/px4fmu-v4_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/px4fmu-v4_default.px4"
},
};
//////////////////////////////////// PX4FMUV2 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FMV2FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/px4fmu-v2_default.px4"
},
...
...
@@ -273,6 +280,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
};
// populate hashes now
int
size
=
sizeof
(
rgPX4FMV4FirmwareArray
)
/
sizeof
(
rgPX4FMV4FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgPX4FMV4FirmwareArray
[
i
];
_rgPX4FMUV4Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
int
size
=
sizeof
(
rgPX4FMV2FirmwareArray
)
/
sizeof
(
rgPX4FMV2FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgPX4FMV2FirmwareArray
[
i
];
...
...
@@ -334,6 +347,10 @@ void FirmwareUpgradeController::_getFirmwareFile(FirmwareIdentifier firmwareId)
prgFirmware
=
_rgPX4FMUV2Firmware
;
break
;
case
Bootloader
::
boardIDPX4FMUV4
:
prgFirmware
=
_rgPX4FMUV4Firmware
;
break
;
case
Bootloader
::
boardIDAeroCore
:
prgFirmware
=
_rgAeroCoreFirmware
;
break
;
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
da3191c3
...
...
@@ -177,6 +177,7 @@ private:
QString
_portDescription
;
// firmware hashes
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV4Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgAeroCoreFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV1Firmware
;
...
...
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