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
59a2947d
Commit
59a2947d
authored
Oct 09, 2017
by
Don Gagne
Committed by
GitHub
Oct 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5731 from kd0aij/auavx21
add support for flashing APM to AUAVX2.1
parents
06dfe6d9
02011a1e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
QGCSetup.pri
QGCSetup.pri
+2
-1
FirmwareImage.cc
src/VehicleSetup/FirmwareImage.cc
+19
-2
FirmwareImage.h
src/VehicleSetup/FirmwareImage.h
+3
-0
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+15
-0
No files found.
QGCSetup.pri
View file @
59a2947d
...
...
@@ -122,7 +122,8 @@ LinuxBuild {
libQt5Svg.so.5 \
libQt5Test.so.5 \
libQt5Widgets.so.5 \
libQt5XcbQpa.so.5
libQt5XcbQpa.so.5 \
libQt5TextToSpeech.so.5
!contains(DEFINES, __rasp_pi2__) {
QT_LIB_LIST += \
...
...
src/VehicleSetup/FirmwareImage.cc
View file @
59a2947d
...
...
@@ -194,6 +194,24 @@ bool FirmwareImage::_ihxLoad(const QString& ihxFilename)
return
true
;
}
bool
FirmwareImage
::
isCompatible
(
uint32_t
boardId
,
uint32_t
firmwareId
)
{
bool
result
=
false
;
if
(
boardId
==
firmwareId
)
{
result
=
true
;
}
switch
(
boardId
)
{
case
Bootloader
:
:
boardIDAUAVX2_1
:
// AUAVX2.1 is compatible with px4-v2/v3
if
(
firmwareId
==
9
)
result
=
true
;
break
;
case
Bootloader
:
:
boardIDPX4FMUV3
:
if
(
firmwareId
==
9
)
result
=
true
;
break
;
default:
break
;
}
return
result
;
}
bool
FirmwareImage
::
_px4Load
(
const
QString
&
imageFilename
)
{
_imageSize
=
0
;
...
...
@@ -237,8 +255,7 @@ bool FirmwareImage::_px4Load(const QString& imageFilename)
}
uint32_t
firmwareBoardId
=
(
uint32_t
)
px4Json
.
value
(
_jsonBoardIdKey
).
toInt
();
uint32_t
actualBoardId
=
_boardId
==
Bootloader
::
boardIDPX4FMUV3
?
Bootloader
::
boardIDPX4FMUV2
:
_boardId
;;
if
(
firmwareBoardId
!=
actualBoardId
)
{
if
(
!
isCompatible
(
_boardId
,
firmwareBoardId
))
{
emit
statusMessage
(
QString
(
"Downloaded firmware board id does not match hardware board id: %1 != %2"
).
arg
(
firmwareBoardId
).
arg
(
_boardId
));
return
false
;
}
...
...
src/VehicleSetup/FirmwareImage.h
View file @
59a2947d
...
...
@@ -56,6 +56,9 @@ public:
/// @return true: block retrieved
bool
ihxGetBlock
(
uint16_t
index
,
uint16_t
&
address
,
QByteArray
&
bytes
)
const
;
/// @return true: actual boardId is compatible with firmware boardId
bool
isCompatible
(
uint32_t
boardId
,
uint32_t
firmwareId
);
signals:
void
errorMessage
(
const
QString
&
errorString
);
void
statusMessage
(
const
QString
&
warningtring
);
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
59a2947d
...
...
@@ -324,6 +324,21 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/auav-x21_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/auav-x21_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/auav-x21_default.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
CopterFirmware
,
"http://firmware.ardupilot.org/Copter/stable/PX4/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
HeliFirmware
,
"http://firmware.ardupilot.org/Copter/stable/PX4-heli/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
PlaneFirmware
,
"http://firmware.ardupilot.org/Plane/stable/PX4/ArduPlane-v2.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
RoverFirmware
,
"http://firmware.ardupilot.org/Rover/stable/PX4/APMrover2-v2.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
SubFirmware
,
"http://firmware.ardupilot.org/Sub/stable/PX4/ArduSub-v2.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
CopterFirmware
,
"http://firmware.ardupilot.org/Copter/beta/PX4/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
HeliFirmware
,
"http://firmware.ardupilot.org/Copter/beta/PX4-heli/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
PlaneFirmware
,
"http://firmware.ardupilot.org/Plane/beta/PX4/ArduPlane-v3.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
RoverFirmware
,
"http://firmware.ardupilot.org/Rover/beta/PX4/APMrover2-v3.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
SubFirmware
,
"http://firmware.ardupilot.org/Sub/beta/PX4/ArduSub-v3.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
CopterFirmware
,
"http://firmware.ardupilot.org/Copter/latest/PX4/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
HeliFirmware
,
"http://firmware.ardupilot.org/Copter/latest/PX4-heli/ArduCopter-v3.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
PlaneFirmware
,
"http://firmware.ardupilot.org/Plane/latest/PX4/ArduPlane-v3.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
RoverFirmware
,
"http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v3.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
SubFirmware
,
"http://firmware.ardupilot.org/Sub/latest/PX4/ArduSub-v3.px4"
}
};
//////////////////////////////////// MindPXFMUV2 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgMindPXFMUV2FirmwareArray
[]
=
{
...
...
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