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
ffdf08e8
Commit
ffdf08e8
authored
Dec 10, 2016
by
Dennis Shtatnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add firmware upgrade support for CF2
parent
05ad4627
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
1 deletion
+76
-1
Bootloader.h
src/VehicleSetup/Bootloader.h
+1
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+16
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+1
-0
LinkManager.cc
src/comm/LinkManager.cc
+6
-0
QGCSerialPortInfo.cc
src/comm/QGCSerialPortInfo.cc
+52
-0
No files found.
src/VehicleSetup/Bootloader.h
View file @
ffdf08e8
...
...
@@ -73,7 +73,7 @@ public:
static
const
int
boardIDMINDPXFMUV2
=
88
;
///< MindPX V2 board, as from USB PID
static
const
int
boardIDTAPV1
=
64
;
///< TAP V1 board, as from USB PID
static
const
int
boardIDASCV1
=
65
;
///< ASC V1 board, as from USB PID
static
const
int
boardIDCrazyflie2
=
12
;
///< Crazyflie 2.0 board, as from USB PID
signals:
/// @brief Signals progress indicator for long running bootloader utility routines
void
updateProgress
(
int
curr
,
int
total
);
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
ffdf08e8
...
...
@@ -335,6 +335,14 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/asc-v1_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/asc-v1_default.px4"
},
};
//////////////////////////////////// Crazyflie 2.0 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgCrazyflie2FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/crazyflie_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/crazyflie_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/crazyflie_default.px4"
},
};
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FLowFirmwareArray
[]
=
{
{
PX4Flow
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4"
},
...
...
@@ -406,6 +414,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgASCV1Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgCrazyflie2FirmwareArray
)
/
sizeof
(
rgCrazyflie2FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgCrazyflie2FirmwareArray
[
i
];
_rgCrazyflie2Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgPX4FLowFirmwareArray
)
/
sizeof
(
rgPX4FLowFirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgPX4FLowFirmwareArray
[
i
];
...
...
@@ -457,6 +471,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
return
&
_rgTAPV1Firmware
;
case
Bootloader
:
:
boardIDASCV1
:
return
&
_rgASCV1Firmware
;
case
Bootloader
:
:
boardIDCrazyflie2
:
return
&
_rgCrazyflie2Firmware
;
case
Bootloader
:
:
boardID3DRRadio
:
return
&
_rg3DRRadioFirmware
;
default:
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
ffdf08e8
...
...
@@ -211,6 +211,7 @@ private:
QHash
<
FirmwareIdentifier
,
QString
>
_rgMindPXFMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgTAPV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgASCV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgCrazyflie2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FLowFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rg3DRRadioFirmware
;
...
...
src/comm/LinkManager.cc
View file @
ffdf08e8
...
...
@@ -526,6 +526,12 @@ void LinkManager::_updateAutoConnectLinks(void)
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypeCrazyflie2
:
if
(
_autoconnectPixhawk
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"Crazyflie on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
if
(
_autoConnectSettings
->
autoConnectPX4Flow
()
->
rawValue
().
toBool
())
{
pSerialConfig
=
new
SerialConfiguration
(
tr
(
"%1 on %2 (AutoConnect)"
).
arg
(
boardName
).
arg
(
portInfo
.
portName
().
trimmed
()));
...
...
src/comm/QGCSerialPortInfo.cc
View file @
ffdf08e8
...
...
@@ -204,6 +204,7 @@ bool QGCSerialPortInfo::getBoardInfo(QGCSerialPortInfo::BoardType_t& boardType,
if
(
boardType
==
BoardTypeUnknown
)
{
// Fall back to port name matching which could lead to incorrect board mapping. But in some cases the
// vendor and product id do not come through correctly so this is used as a last chance detection method.
<<<<<<<
c4da69536e067addfbf394609e9369c1c2d00129
for
(
int
i
=
0
;
i
<
_boardFallbackList
.
count
();
i
++
)
{
const
BoardFallback_t
&
boardFallback
=
_boardFallbackList
[
i
];
...
...
@@ -213,6 +214,44 @@ bool QGCSerialPortInfo::getBoardInfo(QGCSerialPortInfo::BoardType_t& boardType,
if
(
boardFallback
.
androidOnly
)
{
continue
;
}
=======
if
(
description
()
==
"PX4 FMU v4.x"
||
description
()
==
"PX4 BL FMU v4.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found PX4 FMU V4 (by name matching fallback)"
;
boardType
=
BoardTypePX4FMUV4
;
}
else
if
(
description
()
==
"PX4 FMU v2.x"
||
description
()
==
"PX4 BL FMU v2.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found PX4 FMU V2 (by name matching fallback)"
;
boardType
=
BoardTypePX4FMUV2
;
}
else
if
(
description
()
==
"PX4 FMU v1.x"
||
description
()
==
"PX4 BL FMU v1.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found PX4 FMU V1 (by name matching fallback)"
;
boardType
=
BoardTypePX4FMUV1
;
}
else
if
(
description
().
startsWith
(
"PX4 FMU"
))
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found PX4 FMU, assuming V2 (by name matching fallback)"
;
boardType
=
BoardTypePX4FMUV2
;
}
else
if
(
description
().
contains
(
QRegExp
(
"PX4.*Flow"
,
Qt
::
CaseInsensitive
)))
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible px4 flow camera (by name matching fallback)"
;
boardType
=
BoardTypePX4Flow
;
}
else
if
(
description
()
==
"MindPX FMU v2.x"
||
description
()
==
"MindPX BL FMU v2.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found MindPX FMU V2 (by name matching fallback)"
;
boardType
=
BoardTypeMINDPXFMUV2
;
}
else
if
(
description
()
==
"PX4 TAP v1.x"
||
description
()
==
"PX4 BL TAP v1.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found TAP V1 (by name matching fallback)"
;
boardType
=
BoardTypeTAPV1
;
}
else
if
(
description
()
==
"PX4 ASC v1.x"
||
description
()
==
"PX4 BL ASC v1.x"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found ASC V1 (by name matching fallback)"
;
boardType
=
BoardTypeASCV1
;
}
else
if
(
description
()
==
"PX4 Crazyflie v2.0"
||
description
()
==
"Crazyflie BL"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found Crazyflie 2.0 (by name matching fallback)"
;
boardType
=
BoardTypeCrazyflie2
;
}
else
if
(
description
()
==
"FT231X USB UART"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible Radio (by name matching fallback)"
;
boardType
=
BoardTypeSikRadio
;
#ifdef __android__
}
else
if
(
description
().
endsWith
(
"USB UART"
))
{
// This is a fairly broad fallbacks for radios which will also catch most FTDI devices. That would
// cause problems on desktop due to incorrect connections. Since mobile is more anal about connecting
// it will work fine here.
boardType
=
BoardTypeSikRadio
;
>>>>>>>
Add
firmware
upgrade
support
for
CF2
#endif
boardType
=
boardFallback
.
boardType
;
name
=
_boardTypeToString
(
boardType
);
...
...
@@ -259,6 +298,19 @@ QList<QGCSerialPortInfo> QGCSerialPortInfo::availablePorts(void)
return
list
;
}
<<<<<<<
c4da69536e067addfbf394609e9369c1c2d00129
=======
bool
QGCSerialPortInfo
::
boardTypePixhawk
(
void
)
const
{
BoardType_t
boardType
=
this
->
boardType
();
return
boardType
==
BoardTypePX4FMUV1
||
boardType
==
BoardTypePX4FMUV2
||
boardType
==
BoardTypePX4FMUV4
||
boardType
==
BoardTypeAeroCore
||
boardType
==
BoardTypeMINDPXFMUV2
||
boardType
==
BoardTypeTAPV1
||
boardType
==
BoardTypeASCV1
||
boardType
==
BoardTypeCrazyflie2
;
}
>>>>>>>
Add
firmware
upgrade
support
for
CF2
bool
QGCSerialPortInfo
::
isBootloader
(
void
)
const
{
BoardType_t
boardType
;
...
...
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