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
7b5733de
Commit
7b5733de
authored
Jun 08, 2020
by
Jacob Dahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated from reviewer feedback
parent
44d8027d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
+11
-18
UDPLink.cc
src/comm/UDPLink.cc
+7
-12
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+4
-6
No files found.
src/comm/UDPLink.cc
View file @
7b5733de
...
...
@@ -291,21 +291,16 @@ bool UDPLink::_hardwareConnect()
if
(
_connectState
)
{
_socket
->
joinMulticastGroup
(
QHostAddress
(
"224.0.0.1"
));
//-- Make sure we have a large enough IO buffers
#ifdef __mobile__
_socket
->
setSocketOption
(
QAbstractSocket
::
SendBufferSizeSocketOption
,
64
*
1024
);
if
(
_udpConfig
->
isTransmitOnly
())
{
_socket
->
setSocketOption
(
QAbstractSocket
::
ReceiveBufferSizeSocketOption
,
0
);
}
else
{
_socket
->
setSocketOption
(
QAbstractSocket
::
ReceiveBufferSizeSocketOption
,
128
*
1024
);
}
int
bufferSizeMultiplier
=
1
;
#else
_socket
->
setSocketOption
(
QAbstractSocket
::
SendBufferSizeSocketOption
,
256
*
1024
);
if
(
_udpConfig
->
isTransmitOnly
())
{
_socket
->
setSocketOption
(
QAbstractSocket
::
ReceiveBufferSizeSocketOption
,
0
);;
}
else
{
_socket
->
setSocketOption
(
QAbstractSocket
::
ReceiveBufferSizeSocketOption
,
512
*
1024
);;
}
int
bufferSizeMultiplier
=
4
;
#endif
int
receiveBufferSize
=
_udpConfig
->
isTransmitOnly
()
?
0
:
512
*
1024
;
_socket
->
setSocketOption
(
QAbstractSocket
::
SendBufferSizeSocketOption
,
bufferSizeMultiplier
*
64
*
1024
);
_socket
->
setSocketOption
(
QAbstractSocket
::
ReceiveBufferSizeSocketOption
,
bufferSizeMultiplier
*
receiveBufferSize
);
_registerZeroconf
(
_udpConfig
->
localPort
(),
kZeroconfRegistration
);
QObject
::
connect
(
_socket
,
&
QUdpSocket
::
readyRead
,
this
,
&
UDPLink
::
readBytes
);
emit
connected
();
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
7b5733de
...
...
@@ -166,24 +166,22 @@ Rectangle {
QGCLabel
{
width
:
_labelWidth
anchors.baseline
:
mavlinkForwardingHostNameField
.
baseline
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
rawValue
&&
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visible
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visible
text
:
qsTr
(
"
Host name:
"
)
}
FactTextField
{
id
:
mavlinkForwardingHostNameField
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlinkHostName
width
:
_valueWidth
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
rawValue
&&
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visibl
e
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visible
enabled
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
rawValu
e
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCLabel
{
text
:
qsTr
(
"
<i> Changing the host name requires restart of application. </i>
"
)
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
rawValue
&&
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visible
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
forwardMavlink
.
visible
}
}
}
...
...
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