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
f80968c5
Commit
f80968c5
authored
Dec 24, 2013
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some unused debugging code from QGCXPlaneLink.
parent
03e904d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
29 deletions
+5
-29
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+5
-29
No files found.
src/comm/QGCXPlaneLink.cc
View file @
f80968c5
...
...
@@ -404,35 +404,16 @@ Eigen::Matrix3f euler_to_wRo(double yaw, double pitch, double roll) {
void
QGCXPlaneLink
::
writeBytes
(
const
char
*
data
,
qint64
size
)
{
if
(
!
data
)
return
;
//#define QGCXPlaneLink_DEBUG
#if 1
QString
bytes
;
QString
ascii
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
// If socket exists and is connected, transmit the data
if
(
socket
&&
connectState
)
{
unsigned
char
v
=
data
[
i
];
bytes
.
append
(
QString
().
sprintf
(
"%02x "
,
v
));
if
(
data
[
i
]
>
31
&&
data
[
i
]
<
127
)
{
ascii
.
append
(
data
[
i
]);
}
else
{
ascii
.
append
(
219
);
}
socket
->
writeDatagram
(
data
,
size
,
remoteHost
,
remotePort
);
}
//qDebug() << "Sent" << size << "bytes to" << remoteHost.toString() << ":" << remotePort << "data:";
//qDebug() << bytes;
//qDebug() << "ASCII:" << ascii;
#endif
if
(
connectState
&&
socket
)
socket
->
writeDatagram
(
data
,
size
,
remoteHost
,
remotePort
);
}
/**
* @brief Read a number of bytes from the interface.
*
* @param data Pointer to the data byte array to write the bytes to
* @param maxLength The maximum number of bytes to write
* @brief Read all pending packets from the interface.
**/
void
QGCXPlaneLink
::
readBytes
()
{
...
...
@@ -449,11 +430,6 @@ void QGCXPlaneLink::readBytes()
if
(
s
>
maxLength
)
std
::
cerr
<<
__FILE__
<<
__LINE__
<<
" UDP datagram overflow, allowed to read less bytes than datagram size"
<<
std
::
endl
;
socket
->
readDatagram
(
data
,
maxLength
,
&
sender
,
&
senderPort
);
QByteArray
b
(
data
,
s
);
/*// Print string
QString state(b)*/
;
// Calculate the number of data segments a 36 bytes
// XPlane always has 5 bytes header: 'DATA@'
unsigned
nsegs
=
(
s
-
5
)
/
36
;
...
...
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