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
1df0c0d5
Commit
1df0c0d5
authored
Jul 25, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows build adjustments
parent
551701e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
qgroundcontrol.pri
qgroundcontrol.pri
+4
-0
qextserialenumerator_win.cpp
src/libs/qextserialport/qextserialenumerator_win.cpp
+13
-6
No files found.
qgroundcontrol.pri
View file @
1df0c0d5
...
...
@@ -405,6 +405,10 @@ win32-g++ {
CONFIG += CONSOLE
OUTPUT += CONSOLE
# The EIGEN library needs this define
# to make the internal min/max functions work
DEFINES += NOMINMAX
INCLUDEPATH += $$BASEDIR/lib/sdl/include \
$$BASEDIR/lib/opal/include #\ #\
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
...
...
src/libs/qextserialport/qextserialenumerator_win.cpp
View file @
1df0c0d5
...
...
@@ -9,6 +9,13 @@
#include <initguid.h>
//#include "qextserialport.h"
#include <QRegExp>
#ifdef Q_OS_WIN
#ifndef _MSC_VER
#include <windows.h>
#include <dbt.h>
#include <QtCore/qglobal.h>
#endif
#endif
QextSerialEnumerator
::
QextSerialEnumerator
(
)
{
...
...
@@ -193,12 +200,12 @@ bool QextSerialEnumerator::getDeviceDetailsWin( QextPortInfo* portInfo, HDEVINFO
QString
hardwareIDs
=
getDeviceProperty
(
devInfo
,
devData
,
SPDRP_HARDWAREID
);
HKEY
devKey
=
SetupDiOpenDevRegKey
(
devInfo
,
devData
,
DICS_FLAG_GLOBAL
,
0
,
DIREG_DEV
,
KEY_READ
);
QRegExp
rx
(
"^COM(
\\
d+)"
);
QString
fullName
(
getRegKeyValue
(
devKey
,
TEXT
(
"PortName"
)));
if
(
fullName
.
contains
(
rx
))
{
int
portnum
=
rx
.
cap
(
1
).
toInt
();
if
(
portnum
>
9
)
// COM ports greater than 9 need \\.\ prepended
fullName
.
prepend
(
"
\\\\
.
\\
"
);
QRegExp
rx
(
"^COM(
\\
d+)"
);
QString
fullName
(
getRegKeyValue
(
devKey
,
TEXT
(
"PortName"
)));
if
(
fullName
.
contains
(
rx
))
{
int
portnum
=
rx
.
cap
(
1
).
toInt
();
if
(
portnum
>
9
)
// COM ports greater than 9 need \\.\ prepended
fullName
.
prepend
(
"
\\\\
.
\\
"
);
}
portInfo
->
portName
=
fullName
;
...
...
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