From 337c19bb8916217178fed685b2b57f16df42d362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 23 Oct 2018 22:38:31 -0300 Subject: [PATCH] comm: Remove unused variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/comm/QGCJSBSimLink.cc | 25 +++++++++++-------------- src/comm/TCPLink.cc | 1 - 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/comm/QGCJSBSimLink.cc b/src/comm/QGCJSBSimLink.cc index be22be67a..44b65ca6c 100644 --- a/src/comm/QGCJSBSimLink.cc +++ b/src/comm/QGCJSBSimLink.cc @@ -285,23 +285,20 @@ void QGCJSBSimLink::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); - -// // Parse string -// float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed; -// double lat, lon, alt; -// double vx, vy, vz, xacc, yacc, zacc; - -// // Send updated state -// emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed, -// pitchspeed, yawspeed, lat, lon, alt, -// vx, vy, vz, xacc, yacc, zacc); - + QByteArray b(data, s); + QString state(b); + // Parse string + float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed; + double lat, lon, alt; + double vx, vy, vz, xacc, yacc, zacc; + // Send updated state + emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed, + pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc); + */ // Echo data for debugging purposes std::cerr << __FILE__ << __LINE__ << "Received datagram:" << std::endl; diff --git a/src/comm/TCPLink.cc b/src/comm/TCPLink.cc index d91cdb145..2407685ed 100644 --- a/src/comm/TCPLink.cc +++ b/src/comm/TCPLink.cc @@ -253,7 +253,6 @@ static QString get_ip_address(const QString& address) if (info.error() == QHostInfo::NoError) { QList hostAddresses = info.addresses(); - QHostAddress address; for (int i = 0; i < hostAddresses.size(); i++) { // Exclude all IPv6 addresses -- 2.22.0