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
227f1c57
Commit
227f1c57
authored
Aug 15, 2016
by
Lorenz Meier
Committed by
GitHub
Aug 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for a custom board (#3935)
* Add support for another board * Added a 2nd custom board
parent
0b6721c3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
10 deletions
+81
-10
Bootloader.h
src/VehicleSetup/Bootloader.h
+9
-7
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+1
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+42
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+2
-0
LinkManager.cc
src/comm/LinkManager.cc
+13
-1
QGCSerialPortInfo.cc
src/comm/QGCSerialPortInfo.cc
+10
-1
QGCSerialPortInfo.h
src/comm/QGCSerialPortInfo.h
+4
-0
No files found.
src/VehicleSetup/Bootloader.h
View file @
227f1c57
...
...
@@ -61,13 +61,15 @@ public:
bool
reboot
(
QextSerialPort
*
port
);
// 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
static
const
int
boardIDMINDPXFMUV2
=
88
;
///< MindPX V2 board
static
const
int
boardIDPX4FMUV1
=
5
;
///< PX4 V1 board, as from USB PID
static
const
int
boardIDPX4FMUV2
=
9
;
///< PX4 V2 board, as from USB PID
static
const
int
boardIDPX4FMUV4
=
11
;
///< PX4 V4 board, as from USB PID
static
const
int
boardIDPX4Flow
=
6
;
///< PX4 Flow board, as from USB PID
static
const
int
boardIDAeroCore
=
98
;
///< Gumstix AeroCore board, as from USB PID
static
const
int
boardID3DRRadio
=
78
;
///< 3DR Radio. This is an arbitrary value unrelated to the PID
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
signals:
/// @brief Signals progress indicator for long running bootloader utility routines
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
227f1c57
...
...
@@ -97,7 +97,7 @@ QGCView {
}
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
.
boardType
==
"
Pixhawk
"
||
controller
.
boardType
==
"
AeroCore
"
||
controller
.
boardType
==
"
PX4 Flow
"
||
controller
.
boardType
==
"
PX4 FMU V1
"
||
controller
.
boardType
==
"
MindPX
"
)
{
if
(
controller
.
boardType
==
"
Pixhawk
"
||
controller
.
boardType
==
"
AeroCore
"
||
controller
.
boardType
==
"
PX4 Flow
"
||
controller
.
boardType
==
"
PX4 FMU V1
"
||
controller
.
boardType
==
"
MindPX
"
||
controller
.
boardType
==
"
TAP V1
"
||
controller
.
boardType
==
"
ASC V1
"
)
{
showDialog
(
pixhawkFirmwareSelectDialogComponent
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
227f1c57
...
...
@@ -139,6 +139,14 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort
_foundBoardTypeName
=
"MindPX"
;
_startFlashWhenBootloaderFound
=
false
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeTAPV1
:
_foundBoardTypeName
=
"TAP V1"
;
_startFlashWhenBootloaderFound
=
false
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeASCV1
:
_foundBoardTypeName
=
"ASC V1"
;
_startFlashWhenBootloaderFound
=
false
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
_foundBoardTypeName
=
"PX4 Flow"
;
_startFlashWhenBootloaderFound
=
false
;
...
...
@@ -344,6 +352,18 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/mindpx-v2_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/mindpx-v2_default.px4"
},
};
//////////////////////////////////// TAPV1 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgTAPV1FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/tap-v1_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/tap-v1_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/tap-v1_default.px4"
},
};
//////////////////////////////////// ASCV1 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgASCV1FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/asc-v1_default.px4"
},
{
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"
},
};
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FLowFirmwareArray
[]
=
{
{
PX4Flow
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4"
},
...
...
@@ -385,6 +405,18 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgMindPXFMUV2Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgTAPV1FirmwareArray
)
/
sizeof
(
rgTAPV1FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgTAPV1FirmwareArray
[
i
];
_rgTAPV1Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgASCV1FirmwareArray
)
/
sizeof
(
rgASCV1FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgASCV1FirmwareArray
[
i
];
_rgASCV1Firmware
.
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
];
...
...
@@ -420,6 +452,10 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
return
&
_rgAeroCoreFirmware
;
case
Bootloader
:
:
boardIDMINDPXFMUV2
:
return
&
_rgMindPXFMUV2Firmware
;
case
Bootloader
:
:
boardIDTAPV1
:
return
&
_rgTAPV1Firmware
;
case
Bootloader
:
:
boardIDASCV1
:
return
&
_rgASCV1Firmware
;
case
Bootloader
:
:
boardID3DRRadio
:
return
&
_rg3DRRadioFirmware
;
default:
...
...
@@ -447,6 +483,12 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case
QGCSerialPortInfo
:
:
BoardTypeMINDPXFMUV2
:
boardId
=
Bootloader
::
boardIDMINDPXFMUV2
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeTAPV1
:
boardId
=
Bootloader
::
boardIDTAPV1
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeASCV1
:
boardId
=
Bootloader
::
boardIDASCV1
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
boardId
=
Bootloader
::
boardIDPX4Flow
;
break
;
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
227f1c57
...
...
@@ -194,6 +194,8 @@ private:
QHash
<
FirmwareIdentifier
,
QString
>
_rgAeroCoreFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgMindPXFMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgTAPV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgASCV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FLowFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rg3DRRadioFirmware
;
...
...
src/comm/LinkManager.cc
View file @
227f1c57
...
...
@@ -335,7 +335,7 @@ void LinkManager::saveLinkConfigurationList()
linkConfig
->
saveSettings
(
settings
,
root
);
}
}
else
{
qWarning
()
<<
"Internal error"
;
qWarning
()
<<
"Internal error
for link configuration in LinkManager
"
;
}
}
QString
root
(
LinkConfiguration
::
settingsRoot
());
...
...
@@ -542,6 +542,18 @@ void LinkManager::_updateAutoConnectLinks(void)
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypeTAPV1
:
if
(
_autoconnectPixhawk
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"TAP on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypeASCV1
:
if
(
_autoconnectPixhawk
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"ASC on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
if
(
_autoconnectPX4Flow
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"PX4Flow on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
...
...
src/comm/QGCSerialPortInfo.cc
View file @
227f1c57
...
...
@@ -25,6 +25,8 @@ static const struct VIDPIDMapInfo_s {
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
px4FlowProductId
,
QGCSerialPortInfo
::
BoardTypePX4Flow
,
"Found PX4 Flow"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
MindPXFMUV2ProductId
,
QGCSerialPortInfo
::
BoardTypeMINDPXFMUV2
,
"Found MindPX FMU V2"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
TAPV1ProductId
,
QGCSerialPortInfo
::
BoardTypeTAPV1
,
"Found TAP V1"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
ASCV1ProductId
,
QGCSerialPortInfo
::
BoardTypeASCV1
,
"Found ASC V1"
},
{
QGCSerialPortInfo
::
threeDRRadioVendorId
,
QGCSerialPortInfo
::
threeDRRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
siLabsRadioVendorId
,
QGCSerialPortInfo
::
siLabsRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
ubloxRTKVendorId
,
QGCSerialPortInfo
::
ubloxRTKProductId
,
QGCSerialPortInfo
::
BoardTypeRTKGPS
,
"Found RTK GPS"
},
...
...
@@ -81,6 +83,12 @@ QGCSerialPortInfo::BoardType_t QGCSerialPortInfo::boardType(void) const
}
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
()
==
"FT231X USB UART"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible Radio (by name matching fallback)"
;
boardType
=
BoardTypeSikRadio
;
...
...
@@ -114,7 +122,8 @@ bool QGCSerialPortInfo::boardTypePixhawk(void) const
return
boardType
==
BoardTypePX4FMUV1
||
boardType
==
BoardTypePX4FMUV2
||
boardType
==
BoardTypePX4FMUV4
||
boardType
==
BoardTypeAeroCore
||
boardType
==
BoardTypeMINDPXFMUV2
;
||
boardType
==
BoardTypeMINDPXFMUV2
||
boardType
==
BoardTypeTAPV1
||
boardType
==
BoardTypeASCV1
;
}
bool
QGCSerialPortInfo
::
isBootloader
(
void
)
const
...
...
src/comm/QGCSerialPortInfo.h
View file @
227f1c57
...
...
@@ -35,6 +35,8 @@ public:
BoardTypeAeroCore
,
BoardTypeRTKGPS
,
BoardTypeMINDPXFMUV2
,
BoardTypeTAPV1
,
BoardTypeASCV1
,
BoardTypeUnknown
}
BoardType_t
;
...
...
@@ -52,6 +54,8 @@ public:
static
const
int
px4FlowProductId
=
21
;
///< Product ID for PX4 Flow board
static
const
int
MindPXFMUV2ProductId
=
48
;
///< Product ID for the MindPX V2 board
static
const
int
TAPV1ProductId
=
64
;
///< Product ID for the TAP V1 board
static
const
int
ASCV1ProductId
=
65
;
///< Product ID for the ASC V1 board
static
const
int
threeDRRadioVendorId
=
1027
;
///< Vendor ID for 3DR Radio
static
const
int
threeDRRadioProductId
=
24597
;
///< Product ID for 3DR Radio
...
...
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