Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5a03aed7
Commit
5a03aed7
authored
Apr 11, 2016
by
Don Gagne
Browse files
Plumb ublox RTK device ids through QGCSerialPortInfo
parent
d225aa6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
5a03aed7
...
...
@@ -416,8 +416,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case
QGCSerialPortInfo
::
BoardTypeSikRadio
:
boardId
=
Bootloader
::
boardID3DRRadio
;
break
;
case
QGCSerialPortInfo
::
BoardTypeUnknown
:
qWarning
()
<<
"Internal error
"
;
default
:
qWarning
()
<<
"Internal error
: invalid board type for flashing"
<<
boardType
;
boardId
=
Bootloader
::
boardIDPX4FMUV2
;
break
;
}
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
5a03aed7
...
...
@@ -141,7 +141,7 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QGCSerialPortInfo& port
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
"
\t
product ID:"
<<
info
.
productIdentifier
();
boardType
=
info
.
boardType
();
if
(
boardType
!=
QGCSerialPortInfo
::
BoardTypeUnknown
)
{
if
(
info
.
canFlash
()
)
{
portInfo
=
info
;
return
true
;
}
...
...
src/comm/QGCSerialPortInfo.cc
View file @
5a03aed7
...
...
@@ -39,6 +39,7 @@ static const struct VIDPIDMapInfo_s {
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
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"
},
};
QGCSerialPortInfo
::
QGCSerialPortInfo
(
void
)
:
...
...
@@ -128,3 +129,10 @@ bool QGCSerialPortInfo::isBootloader(void) const
// FIXME: Check SerialLink bootloade detect code which is different
return
boardTypePixhawk
()
&&
description
().
contains
(
"BL"
);
}
bool
QGCSerialPortInfo
::
canFlash
(
void
)
{
BoardType_t
boardType
=
this
->
boardType
();
return
boardType
!=
QGCSerialPortInfo
::
BoardTypeUnknown
&&
boardType
!=
QGCSerialPortInfo
::
BoardTypeRTKGPS
;
}
src/comm/QGCSerialPortInfo.h
View file @
5a03aed7
...
...
@@ -46,6 +46,7 @@ public:
BoardTypePX4Flow
,
BoardTypeSikRadio
,
BoardTypeAeroCore
,
BoardTypeRTKGPS
,
BoardTypeUnknown
}
BoardType_t
;
...
...
@@ -68,6 +69,9 @@ public:
static
const
int
siLabsRadioVendorId
=
0x10c4
;
///< Vendor ID for SILabs Radio
static
const
int
siLabsRadioProductId
=
0xea60
;
///< Product ID for SILabs Radio
static
const
int
ubloxRTKVendorId
=
5446
;
///< Vendor ID for ublox RTK
static
const
int
ubloxRTKProductId
=
424
;
///< Product ID for ublox RTK
QGCSerialPortInfo
(
void
);
QGCSerialPortInfo
(
const
QSerialPort
&
port
);
...
...
@@ -76,6 +80,9 @@ public:
BoardType_t
boardType
(
void
)
const
;
/// @return true: we can flash this board type
bool
canFlash
(
void
);
/// @return true: board is a Pixhawk board
bool
boardTypePixhawk
(
void
)
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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