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
369f76a4
Commit
369f76a4
authored
Oct 06, 2017
by
Mark Whitehorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for flashing APM to AUAVX2.1
parent
dd43501a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
FirmwareImage.cc
src/VehicleSetup/FirmwareImage.cc
+1
-1
FirmwareImage.h
src/VehicleSetup/FirmwareImage.h
+16
-0
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+15
-0
No files found.
src/VehicleSetup/FirmwareImage.cc
View file @
369f76a4
...
...
@@ -238,7 +238,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
(
actualBoardId
,
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 @
369f76a4
...
...
@@ -56,6 +56,22 @@ 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
)
{
bool
result
=
false
;
if
(
boardId
==
firmwareId
)
{
result
=
true
;
}
switch
(
boardId
)
{
case
33
:
// AUAVX2.1 is compatible with px4-v2/v3
if
(
firmwareId
==
9
)
result
=
true
;
break
;
default:
break
;
}
return
result
;
}
signals:
void
errorMessage
(
const
QString
&
errorString
);
void
statusMessage
(
const
QString
&
warningtring
);
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
369f76a4
...
...
@@ -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