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
db59e0bb
Commit
db59e0bb
authored
Apr 12, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3205 from DonLakeFlyer/RTKSerialPortInfo
Plumb ublox RTK device ids through QGCSerialPortInfo
parents
7a6a9884
5a03aed7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+2
-2
PX4FirmwareUpgradeThread.cc
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
+1
-1
QGCSerialPortInfo.cc
src/comm/QGCSerialPortInfo.cc
+8
-0
QGCSerialPortInfo.h
src/comm/QGCSerialPortInfo.h
+7
-0
No files found.
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
db59e0bb
...
@@ -416,8 +416,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
...
@@ -416,8 +416,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case
QGCSerialPortInfo
:
:
BoardTypeSikRadio
:
case
QGCSerialPortInfo
:
:
BoardTypeSikRadio
:
boardId
=
Bootloader
::
boardID3DRRadio
;
boardId
=
Bootloader
::
boardID3DRRadio
;
break
;
break
;
case
QGCSerialPortInfo
:
:
BoardTypeUnknown
:
default
:
qWarning
()
<<
"Internal error
"
;
qWarning
()
<<
"Internal error
: invalid board type for flashing"
<<
boardType
;
boardId
=
Bootloader
::
boardIDPX4FMUV2
;
boardId
=
Bootloader
::
boardIDPX4FMUV2
;
break
;
break
;
}
}
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
db59e0bb
...
@@ -141,7 +141,7 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QGCSerialPortInfo& port
...
@@ -141,7 +141,7 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QGCSerialPortInfo& port
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
"
\t
product ID:"
<<
info
.
productIdentifier
();
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
"
\t
product ID:"
<<
info
.
productIdentifier
();
boardType
=
info
.
boardType
();
boardType
=
info
.
boardType
();
if
(
boardType
!=
QGCSerialPortInfo
::
BoardTypeUnknown
)
{
if
(
info
.
canFlash
()
)
{
portInfo
=
info
;
portInfo
=
info
;
return
true
;
return
true
;
}
}
...
...
src/comm/QGCSerialPortInfo.cc
View file @
db59e0bb
...
@@ -39,6 +39,7 @@ static const struct VIDPIDMapInfo_s {
...
@@ -39,6 +39,7 @@ static const struct VIDPIDMapInfo_s {
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
QGCSerialPortInfo
::
px4VendorId
,
QGCSerialPortInfo
::
AeroCoreProductId
,
QGCSerialPortInfo
::
BoardTypeAeroCore
,
"Found AeroCore"
},
{
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
::
QGCSerialPortInfo
(
void
)
:
QGCSerialPortInfo
::
QGCSerialPortInfo
(
void
)
:
...
@@ -128,3 +129,10 @@ bool QGCSerialPortInfo::isBootloader(void) const
...
@@ -128,3 +129,10 @@ bool QGCSerialPortInfo::isBootloader(void) const
// FIXME: Check SerialLink bootloade detect code which is different
// FIXME: Check SerialLink bootloade detect code which is different
return
boardTypePixhawk
()
&&
description
().
contains
(
"BL"
);
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 @
db59e0bb
...
@@ -46,6 +46,7 @@ public:
...
@@ -46,6 +46,7 @@ public:
BoardTypePX4Flow
,
BoardTypePX4Flow
,
BoardTypeSikRadio
,
BoardTypeSikRadio
,
BoardTypeAeroCore
,
BoardTypeAeroCore
,
BoardTypeRTKGPS
,
BoardTypeUnknown
BoardTypeUnknown
}
BoardType_t
;
}
BoardType_t
;
...
@@ -68,6 +69,9 @@ public:
...
@@ -68,6 +69,9 @@ public:
static
const
int
siLabsRadioVendorId
=
0x10c4
;
///< Vendor ID for SILabs Radio
static
const
int
siLabsRadioVendorId
=
0x10c4
;
///< Vendor ID for SILabs Radio
static
const
int
siLabsRadioProductId
=
0xea60
;
///< Product 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
(
void
);
QGCSerialPortInfo
(
const
QSerialPort
&
port
);
QGCSerialPortInfo
(
const
QSerialPort
&
port
);
...
@@ -76,6 +80,9 @@ public:
...
@@ -76,6 +80,9 @@ public:
BoardType_t
boardType
(
void
)
const
;
BoardType_t
boardType
(
void
)
const
;
/// @return true: we can flash this board type
bool
canFlash
(
void
);
/// @return true: board is a Pixhawk board
/// @return true: board is a Pixhawk board
bool
boardTypePixhawk
(
void
)
const
;
bool
boardTypePixhawk
(
void
)
const
;
...
...
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