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
6b464388
Commit
6b464388
authored
May 21, 2016
by
Henry Zhang
Committed by
Lorenz Meier
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support MindPX v2. (#3382)
parent
06d30786
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
2 deletions
+40
-2
Bootloader.h
src/VehicleSetup/Bootloader.h
+1
-0
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+1
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+21
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+1
-0
LinkManager.cc
src/comm/LinkManager.cc
+6
-0
QGCSerialPortInfo.cc
src/comm/QGCSerialPortInfo.cc
+7
-1
QGCSerialPortInfo.h
src/comm/QGCSerialPortInfo.h
+3
-0
No files found.
src/VehicleSetup/Bootloader.h
View file @
6b464388
...
@@ -80,6 +80,7 @@ public:
...
@@ -80,6 +80,7 @@ public:
static
const
int
boardIDPX4Flow
=
6
;
///< PX4 Flow board
static
const
int
boardIDPX4Flow
=
6
;
///< PX4 Flow board
static
const
int
boardIDAeroCore
=
98
;
///< Gumstix AeroCore board
static
const
int
boardIDAeroCore
=
98
;
///< Gumstix AeroCore board
static
const
int
boardID3DRRadio
=
78
;
///< 3DR Radio
static
const
int
boardID3DRRadio
=
78
;
///< 3DR Radio
static
const
int
boardIDMINDPXFMUV2
=
88
;
///< MindPX V2 board
signals:
signals:
/// @brief Signals progress indicator for long running bootloader utility routines
/// @brief Signals progress indicator for long running bootloader utility routines
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
6b464388
...
@@ -110,7 +110,7 @@ QGCView {
...
@@ -110,7 +110,7 @@ QGCView {
}
else
{
}
else
{
// We end up here when we detect a board plugged in after we've started upgrade
// 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
)
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
"
)
{
if
(
controller
.
boardType
==
"
Pixhawk
"
||
controller
.
boardType
==
"
AeroCore
"
||
controller
.
boardType
==
"
PX4 Flow
"
||
controller
.
boardType
==
"
PX4 FMU V1
"
||
controller
.
boardType
==
"
MindPX
"
)
{
showDialog
(
pixhawkFirmwareSelectDialog
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
showDialog
(
pixhawkFirmwareSelectDialog
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
}
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
6b464388
...
@@ -143,6 +143,10 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort
...
@@ -143,6 +143,10 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort
_foundBoardTypeName
=
"AeroCore"
;
_foundBoardTypeName
=
"AeroCore"
;
_startFlashWhenBootloaderFound
=
false
;
_startFlashWhenBootloaderFound
=
false
;
break
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeMINDPXFMUV2
:
_foundBoardTypeName
=
"MindPX"
;
_startFlashWhenBootloaderFound
=
false
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
_foundBoardTypeName
=
"PX4 Flow"
;
_foundBoardTypeName
=
"PX4 Flow"
;
_startFlashWhenBootloaderFound
=
false
;
_startFlashWhenBootloaderFound
=
false
;
...
@@ -318,6 +322,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
...
@@ -318,6 +322,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackAPM
,
DeveloperFirmware
,
RoverFirmware
,
"http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v1.px4"
}
{
AutoPilotStackAPM
,
DeveloperFirmware
,
RoverFirmware
,
"http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v1.px4"
}
};
};
//////////////////////////////////// MindPXFMUV2 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgMindPXFMUV2FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/mindpx-v2_default.px4"
},
{
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"
},
};
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FLowFirmwareArray
[]
=
{
FirmwareToUrlElement_t
rgPX4FLowFirmwareArray
[]
=
{
{
PX4Flow
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4"
},
{
PX4Flow
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4"
},
...
@@ -353,6 +363,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
...
@@ -353,6 +363,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgPX4FMUV1Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
_rgPX4FMUV1Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
}
size
=
sizeof
(
rgMindPXFMUV2FirmwareArray
)
/
sizeof
(
rgMindPXFMUV2FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgMindPXFMUV2FirmwareArray
[
i
];
_rgMindPXFMUV2Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgPX4FLowFirmwareArray
)
/
sizeof
(
rgPX4FLowFirmwareArray
[
0
]);
size
=
sizeof
(
rgPX4FLowFirmwareArray
)
/
sizeof
(
rgPX4FLowFirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgPX4FLowFirmwareArray
[
i
];
const
FirmwareToUrlElement_t
&
element
=
rgPX4FLowFirmwareArray
[
i
];
...
@@ -386,6 +402,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
...
@@ -386,6 +402,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
return
&
_rgPX4FMUV4Firmware
;
return
&
_rgPX4FMUV4Firmware
;
case
Bootloader
:
:
boardIDAeroCore
:
case
Bootloader
:
:
boardIDAeroCore
:
return
&
_rgAeroCoreFirmware
;
return
&
_rgAeroCoreFirmware
;
case
Bootloader
:
:
boardIDMINDPXFMUV2
:
return
&
_rgMindPXFMUV2Firmware
;
case
Bootloader
:
:
boardID3DRRadio
:
case
Bootloader
:
:
boardID3DRRadio
:
return
&
_rg3DRRadioFirmware
;
return
&
_rg3DRRadioFirmware
;
default:
default:
...
@@ -410,6 +428,9 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
...
@@ -410,6 +428,9 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case
QGCSerialPortInfo
:
:
BoardTypeAeroCore
:
case
QGCSerialPortInfo
:
:
BoardTypeAeroCore
:
boardId
=
Bootloader
::
boardIDAeroCore
;
boardId
=
Bootloader
::
boardIDAeroCore
;
break
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeMINDPXFMUV2
:
boardId
=
Bootloader
::
boardIDMINDPXFMUV2
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
boardId
=
Bootloader
::
boardIDPX4Flow
;
boardId
=
Bootloader
::
boardIDPX4Flow
;
break
;
break
;
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
6b464388
...
@@ -197,6 +197,7 @@ private:
...
@@ -197,6 +197,7 @@ private:
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgAeroCoreFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgAeroCoreFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FMUV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgMindPXFMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FLowFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FLowFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rg3DRRadioFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rg3DRRadioFirmware
;
...
...
src/comm/LinkManager.cc
View file @
6b464388
...
@@ -549,6 +549,12 @@ void LinkManager::_updateAutoConnectLinks(void)
...
@@ -549,6 +549,12 @@ void LinkManager::_updateAutoConnectLinks(void)
pSerialConfig
->
setUsbDirect
(
true
);
pSerialConfig
->
setUsbDirect
(
true
);
}
}
break
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeMINDPXFMUV2
:
if
(
_autoconnectPixhawk
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"MindPX on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerialConfig
->
setUsbDirect
(
true
);
}
break
;
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
case
QGCSerialPortInfo
:
:
BoardTypePX4Flow
:
if
(
_autoconnectPX4Flow
)
{
if
(
_autoconnectPX4Flow
)
{
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"PX4Flow on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerialConfig
=
new
SerialConfiguration
(
QString
(
"PX4Flow on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
...
...
src/comm/QGCSerialPortInfo.cc
View file @
6b464388
...
@@ -37,6 +37,7 @@ static const struct VIDPIDMapInfo_s {
...
@@ -37,6 +37,7 @@ static const struct VIDPIDMapInfo_s {
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
pixhawkFMUV1ProductId
,
QGCSerialPortInfo
::
BoardTypePX4FMUV1
,
"Found PX4 FMU V1"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
pixhawkFMUV1ProductId
,
QGCSerialPortInfo
::
BoardTypePX4FMUV1
,
"Found PX4 FMU V1"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
px4FlowProductId
,
QGCSerialPortInfo
::
BoardTypePX4Flow
,
"Found PX4 Flow"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
px4FlowProductId
,
QGCSerialPortInfo
::
BoardTypePX4Flow
,
"Found PX4 Flow"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
MindPXFMUV2ProductId
,
QGCSerialPortInfo
::
BoardTypeMINDPXFMUV2
,
"Found MindPX FMU V2"
},
{
QGCSerialPortInfo
::
threeDRRadioVendorId
,
QGCSerialPortInfo
::
threeDRRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
threeDRRadioVendorId
,
QGCSerialPortInfo
::
threeDRRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
siLabsRadioVendorId
,
QGCSerialPortInfo
::
siLabsRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
siLabsRadioVendorId
,
QGCSerialPortInfo
::
siLabsRadioProductId
,
QGCSerialPortInfo
::
BoardTypeSikRadio
,
"Found SiK Radio"
},
{
QGCSerialPortInfo
::
ubloxRTKVendorId
,
QGCSerialPortInfo
::
ubloxRTKProductId
,
QGCSerialPortInfo
::
BoardTypeRTKGPS
,
"Found RTK GPS"
},
{
QGCSerialPortInfo
::
ubloxRTKVendorId
,
QGCSerialPortInfo
::
ubloxRTKProductId
,
QGCSerialPortInfo
::
BoardTypeRTKGPS
,
"Found RTK GPS"
},
...
@@ -90,6 +91,9 @@ QGCSerialPortInfo::BoardType_t QGCSerialPortInfo::boardType(void) const
...
@@ -90,6 +91,9 @@ QGCSerialPortInfo::BoardType_t QGCSerialPortInfo::boardType(void) const
}
else
if
(
description
().
contains
(
QRegExp
(
"PX4.*Flow"
,
Qt
::
CaseInsensitive
)))
{
}
else
if
(
description
().
contains
(
QRegExp
(
"PX4.*Flow"
,
Qt
::
CaseInsensitive
)))
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible px4 flow camera (by name matching fallback)"
;
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible px4 flow camera (by name matching fallback)"
;
boardType
=
BoardTypePX4Flow
;
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
()
==
"FT231X USB UART"
)
{
}
else
if
(
description
()
==
"FT231X USB UART"
)
{
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible Radio (by name matching fallback)"
;
qCDebug
(
QGCSerialPortInfoLog
)
<<
"Found possible Radio (by name matching fallback)"
;
boardType
=
BoardTypeSikRadio
;
boardType
=
BoardTypeSikRadio
;
...
@@ -121,7 +125,9 @@ bool QGCSerialPortInfo::boardTypePixhawk(void) const
...
@@ -121,7 +125,9 @@ bool QGCSerialPortInfo::boardTypePixhawk(void) const
{
{
BoardType_t
boardType
=
this
->
boardType
();
BoardType_t
boardType
=
this
->
boardType
();
return
boardType
==
BoardTypePX4FMUV1
||
boardType
==
BoardTypePX4FMUV2
||
boardType
==
BoardTypePX4FMUV4
||
boardType
==
BoardTypeAeroCore
;
return
boardType
==
BoardTypePX4FMUV1
||
boardType
==
BoardTypePX4FMUV2
||
boardType
==
BoardTypePX4FMUV4
||
boardType
==
BoardTypeAeroCore
||
boardType
==
BoardTypeMINDPXFMUV2
;
}
}
bool
QGCSerialPortInfo
::
isBootloader
(
void
)
const
bool
QGCSerialPortInfo
::
isBootloader
(
void
)
const
...
...
src/comm/QGCSerialPortInfo.h
View file @
6b464388
...
@@ -47,6 +47,7 @@ public:
...
@@ -47,6 +47,7 @@ public:
BoardTypeSikRadio
,
BoardTypeSikRadio
,
BoardTypeAeroCore
,
BoardTypeAeroCore
,
BoardTypeRTKGPS
,
BoardTypeRTKGPS
,
BoardTypeMINDPXFMUV2
,
BoardTypeUnknown
BoardTypeUnknown
}
BoardType_t
;
}
BoardType_t
;
...
@@ -63,6 +64,8 @@ public:
...
@@ -63,6 +64,8 @@ public:
static
const
int
px4FlowProductId
=
21
;
///< Product ID for PX4 Flow board
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
threeDRRadioVendorId
=
1027
;
///< Vendor ID for 3DR Radio
static
const
int
threeDRRadioVendorId
=
1027
;
///< Vendor ID for 3DR Radio
static
const
int
threeDRRadioProductId
=
24597
;
///< Product 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