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
c283f840
Commit
c283f840
authored
Feb 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1265 from dogmaphobic/issue1261
Fixed issue #1261
parents
4e45e0f4
74091411
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
TCPLink.cc
src/comm/TCPLink.cc
+1
-1
UDPLink.cc
src/comm/UDPLink.cc
+2
-2
UDPLink.h
src/comm/UDPLink.h
+2
-1
QGCUDPLinkConfiguration.cc
src/ui/QGCUDPLinkConfiguration.cc
+1
-1
No files found.
src/comm/TCPLink.cc
View file @
c283f840
...
@@ -291,7 +291,7 @@ void TCPConfiguration::saveSettings(QSettings& settings, const QString& root)
...
@@ -291,7 +291,7 @@ void TCPConfiguration::saveSettings(QSettings& settings, const QString& root)
void
TCPConfiguration
::
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
)
void
TCPConfiguration
::
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
)
{
{
settings
.
beginGroup
(
root
);
settings
.
beginGroup
(
root
);
_port
=
(
quint16
)
settings
.
value
(
"port"
,
QGC_
UD
P_PORT
).
toUInt
();
_port
=
(
quint16
)
settings
.
value
(
"port"
,
QGC_
TC
P_PORT
).
toUInt
();
QString
address
=
settings
.
value
(
"host"
,
_address
.
toString
()).
toString
();
QString
address
=
settings
.
value
(
"host"
,
_address
.
toString
()).
toString
();
_address
=
address
;
_address
=
address
;
settings
.
endGroup
();
settings
.
endGroup
();
...
...
src/comm/UDPLink.cc
View file @
c283f840
...
@@ -267,7 +267,7 @@ qint64 UDPLink::getCurrentOutDataRate() const
...
@@ -267,7 +267,7 @@ qint64 UDPLink::getCurrentOutDataRate() const
UDPConfiguration
::
UDPConfiguration
(
const
QString
&
name
)
:
LinkConfiguration
(
name
)
UDPConfiguration
::
UDPConfiguration
(
const
QString
&
name
)
:
LinkConfiguration
(
name
)
{
{
_localPort
=
QGC_UDP_PORT
;
_localPort
=
QGC_UDP_
LOCAL_
PORT
;
}
}
UDPConfiguration
::
UDPConfiguration
(
UDPConfiguration
*
source
)
:
LinkConfiguration
(
source
)
UDPConfiguration
::
UDPConfiguration
(
UDPConfiguration
*
source
)
:
LinkConfiguration
(
source
)
...
@@ -404,7 +404,7 @@ void UDPConfiguration::loadSettings(QSettings& settings, const QString& root)
...
@@ -404,7 +404,7 @@ void UDPConfiguration::loadSettings(QSettings& settings, const QString& root)
_confMutex
.
lock
();
_confMutex
.
lock
();
settings
.
beginGroup
(
root
);
settings
.
beginGroup
(
root
);
_hosts
.
clear
();
_hosts
.
clear
();
_localPort
=
(
quint16
)
settings
.
value
(
"port"
,
QGC_UDP_PORT
).
toUInt
();
_localPort
=
(
quint16
)
settings
.
value
(
"port"
,
QGC_UDP_
LOCAL_
PORT
).
toUInt
();
int
hostCount
=
settings
.
value
(
"hostCount"
,
0
).
toInt
();
int
hostCount
=
settings
.
value
(
"hostCount"
,
0
).
toInt
();
for
(
int
i
=
0
;
i
<
hostCount
;
i
++
)
{
for
(
int
i
=
0
;
i
<
hostCount
;
i
++
)
{
QString
hkey
=
QString
(
"host%1"
).
arg
(
i
);
QString
hkey
=
QString
(
"host%1"
).
arg
(
i
);
...
...
src/comm/UDPLink.h
View file @
c283f840
...
@@ -40,7 +40,8 @@ This file is part of the QGROUNDCONTROL project
...
@@ -40,7 +40,8 @@ This file is part of the QGROUNDCONTROL project
#include "QGCConfig.h"
#include "QGCConfig.h"
#include "LinkManager.h"
#include "LinkManager.h"
#define QGC_UDP_PORT 14550
#define QGC_UDP_LOCAL_PORT 14550
#define QGC_UDP_TARGET_PORT 14555
class
UDPConfiguration
:
public
LinkConfiguration
class
UDPConfiguration
:
public
LinkConfiguration
{
{
...
...
src/ui/QGCUDPLinkConfiguration.cc
View file @
c283f840
...
@@ -108,7 +108,7 @@ void QGCUDPLinkConfiguration::on_addHost_clicked()
...
@@ -108,7 +108,7 @@ void QGCUDPLinkConfiguration::on_addHost_clicked()
QString
hostName
=
QInputDialog
::
getText
(
QString
hostName
=
QInputDialog
::
getText
(
this
,
tr
(
"Add a host target to MAVLink"
),
this
,
tr
(
"Add a host target to MAVLink"
),
tr
(
"Host (hostname:port): "
),
tr
(
"Host (hostname:port): "
),
QLineEdit
::
Normal
,
QString
(
"localhost:%1"
).
arg
(
QGC_UDP_PORT
),
&
ok
);
QLineEdit
::
Normal
,
QString
(
"localhost:%1"
).
arg
(
QGC_UDP_
TARGET_
PORT
),
&
ok
);
if
(
ok
&&
!
hostName
.
isEmpty
())
{
if
(
ok
&&
!
hostName
.
isEmpty
())
{
_config
->
addHost
(
hostName
);
_config
->
addHost
(
hostName
);
_reloadList
();
_reloadList
();
...
...
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