diff --git a/src/comm/QGCJSBSimLink.cc b/src/comm/QGCJSBSimLink.cc index be22be67aba8564463cba61b1a6314c897991c75..44b65ca6c61b1834f1360b88c3699886e9433a15 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 d91cdb145d5b4ed9ff79092a22145264f46505d2..2407685edc2815ea169432258334096e27abe62c 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