Browse Source

comm: Remove unused variables

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 7 years ago
parent
commit
337c19bb89
  1. 25
      src/comm/QGCJSBSimLink.cc
  2. 1
      src/comm/TCPLink.cc

25
src/comm/QGCJSBSimLink.cc

@ -285,23 +285,20 @@ void QGCJSBSimLink::readBytes() @@ -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;

1
src/comm/TCPLink.cc

@ -253,7 +253,6 @@ static QString get_ip_address(const QString& address) @@ -253,7 +253,6 @@ static QString get_ip_address(const QString& address)
if (info.error() == QHostInfo::NoError)
{
QList<QHostAddress> hostAddresses = info.addresses();
QHostAddress address;
for (int i = 0; i < hostAddresses.size(); i++)
{
// Exclude all IPv6 addresses

Loading…
Cancel
Save