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
0320b530
Commit
0320b530
authored
Feb 22, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence some queued signal warnings
parent
3c5a3553
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
SerialLink.cc
src/comm/SerialLink.cc
+6
-1
SerialLink.h
src/comm/SerialLink.h
+5
-1
TCPLink.cc
src/comm/TCPLink.cc
+6
-0
TCPLink.h
src/comm/TCPLink.h
+7
-1
No files found.
src/comm/SerialLink.cc
View file @
0320b530
...
...
@@ -26,6 +26,9 @@ SerialLink::SerialLink(QString portname, int baudRate, bool hardwareFlowControl,
m_stopp
(
false
),
m_reqReset
(
false
)
{
// We use QSerialPort::SerialPortError in a signal so we must declare it as a meta type
static
int
idMetaType
=
qRegisterMetaType
<
QSerialPort
::
SerialPortError
>
();
Q_UNUSED
(
idMetaType
);
// Get the name of the current port in use.
m_portName
=
portname
.
trimmed
();
...
...
@@ -445,7 +448,9 @@ bool SerialLink::hardwareConnect()
void
SerialLink
::
linkError
(
QSerialPort
::
SerialPortError
error
)
{
qDebug
()
<<
error
;
if
(
error
!=
QSerialPort
::
NoError
)
{
qDebug
()
<<
"SerialLink::linkError"
<<
error
;
}
}
...
...
src/comm/SerialLink.h
View file @
0320b530
...
...
@@ -36,10 +36,14 @@ This file is part of the QGROUNDCONTROL project
#include <QThread>
#include <QMutex>
#include <QString>
#include <qserialport.h>
#include <configuration.h>
#include "SerialLinkInterface.h"
// We use QSerialPort::SerialPortError in a signal so we must declare it as a meta type
#include <qserialport.h>
#include <QMetaType>
Q_DECLARE_METATYPE
(
QSerialPort
::
SerialPortError
)
/**
* @brief The SerialLink class provides cross-platform access to serial links.
* It takes care of the link management and provides a common API to higher
...
...
src/comm/TCPLink.cc
View file @
0320b530
...
...
@@ -43,6 +43,12 @@ TCPLink::TCPLink(QHostAddress hostAddress, quint16 socketPort) :
_socket
(
NULL
),
_socketIsConnected
(
false
)
{
// Even though QAbstractSocket::SocketError is used in a signal by Qt, Qt doesn't declare it as a meta type.
// This in turn causes debug output to be kicked out about not being able to queue the signal. We register it
// as a meta type to silence that.
static
int
idMetaType
=
qRegisterMetaType
<
QAbstractSocket
::
SocketError
>
();
Q_UNUSED
(
idMetaType
);
_linkId
=
getNextLinkId
();
_resetName
();
...
...
src/comm/TCPLink.h
View file @
0320b530
...
...
@@ -34,10 +34,16 @@
#include <QMap>
#include <QMutex>
#include <QHostAddress>
#include <QTcpSocket>
#include <LinkInterface.h>
#include <configuration.h>
// Even though QAbstractSocket::SocketError is used in a signal by Qt, Qt doesn't declare it as a meta type.
// This in turn causes debug output to be kicked out about not being able to queue the signal. We declare it
// as a meta type to silence that.
#include <QMetaType>
#include <QTcpSocket>
Q_DECLARE_METATYPE
(
QAbstractSocket
::
SocketError
)
//#define TCPLINK_READWRITE_DEBUG // Use to debug data reads/writes
class
TCPLink
:
public
LinkInterface
...
...
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