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
eb811905
Commit
eb811905
authored
Mar 13, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1357 from dogmaphobic/serialPortFix
Serial port fix
parents
34337970
cb63f6de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
QGCConfig.h
src/QGCConfig.h
+1
-1
LinkManager.cc
src/comm/LinkManager.cc
+2
-2
SerialLink.cc
src/comm/SerialLink.cc
+1
-1
QGCLinkConfiguration.cc
src/ui/QGCLinkConfiguration.cc
+9
-3
No files found.
src/QGCConfig.h
View file @
eb811905
...
...
@@ -12,7 +12,7 @@
// If you need to make an incompatible changes to stored settings, bump this version number
// up by 1. This will caused store settings to be cleared on next boot.
#define QGC_SETTINGS_VERSION
3
#define QGC_SETTINGS_VERSION
4
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_ORG_NAME "QGroundControl.org"
...
...
src/comm/LinkManager.cc
View file @
eb811905
...
...
@@ -465,7 +465,7 @@ void LinkManager::_updateConfigurationList(void)
#endif
// Is this a PX4?
if
(
portInfo
.
vendorIdentifier
()
==
9900
)
{
SerialConfiguration
*
pSerial
=
_findSerialConfiguration
(
portInfo
.
portName
());
SerialConfiguration
*
pSerial
=
_findSerialConfiguration
(
portInfo
.
systemLocation
());
if
(
pSerial
)
{
//-- If this port is configured make sure it has the preferred flag set
if
(
!
pSerial
->
isPreferred
())
{
...
...
@@ -477,7 +477,7 @@ void LinkManager::_updateConfigurationList(void)
pSerial
=
new
SerialConfiguration
(
QString
(
"Pixhawk on %1"
).
arg
(
portInfo
.
portName
().
trimmed
()));
pSerial
->
setPreferred
(
true
);
pSerial
->
setBaud
(
115200
);
pSerial
->
setPortName
(
portInfo
.
portName
());
pSerial
->
setPortName
(
portInfo
.
systemLocation
());
addLinkConfiguration
(
pSerial
);
saveList
=
true
;
}
...
...
src/comm/SerialLink.cc
View file @
eb811905
...
...
@@ -588,7 +588,7 @@ QList<QString> SerialConfiguration::getCurrentPorts()
QList
<
QSerialPortInfo
>
portList
=
QSerialPortInfo
::
availablePorts
();
foreach
(
const
QSerialPortInfo
&
info
,
portList
)
{
ports
.
append
(
info
.
portName
());
ports
.
append
(
info
.
systemLocation
());
}
return
ports
;
}
src/ui/QGCLinkConfiguration.cc
View file @
eb811905
...
...
@@ -137,10 +137,16 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config)
//-- Check for "Unnamed"
if
(
config
->
name
()
==
tr
(
"Unnamed"
))
{
switch
(
config
->
type
())
{
case
LinkConfiguration
:
:
TypeSerial
:
config
->
setName
(
QString
(
"Serial Device on %1"
).
arg
(
dynamic_cast
<
SerialConfiguration
*>
(
config
)
->
portName
()));
case
LinkConfiguration
:
:
TypeSerial
:
{
QString
tname
=
dynamic_cast
<
SerialConfiguration
*>
(
config
)
->
portName
();
#ifdef Q_OS_WIN32
tname
.
replace
(
"
\\\\
.
\\
"
,
""
);
#else
tname
.
replace
(
"/dev/"
,
""
);
#endif
config
->
setName
(
QString
(
"Serial Device on %1"
).
arg
(
tname
));
break
;
}
case
LinkConfiguration
:
:
TypeUdp
:
config
->
setName
(
QString
(
"UDP Link on Port %1"
).
arg
(
dynamic_cast
<
UDPConfiguration
*>
(
config
)
->
localPort
()));
...
...
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