Commit 6e9ac2fc authored by Lorenz Meier's avatar Lorenz Meier

Merge branch 'master' into thread_test

parents 61f64e1c 99d187a4
...@@ -55,6 +55,7 @@ QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress ...@@ -55,6 +55,7 @@ QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress
simUpdateLast(QGC::groundTimeMilliseconds()), simUpdateLast(QGC::groundTimeMilliseconds()),
simUpdateFirst(0), simUpdateFirst(0),
simUpdateLastText(QGC::groundTimeMilliseconds()), simUpdateLastText(QGC::groundTimeMilliseconds()),
simUpdateLastGroundTruth(QGC::groundTimeMilliseconds()),
simUpdateHz(0), simUpdateHz(0),
_sensorHilEnabled(true) _sensorHilEnabled(true)
{ {
...@@ -783,13 +784,13 @@ void QGCXPlaneLink::readBytes() ...@@ -783,13 +784,13 @@ void QGCXPlaneLink::readBytes()
} }
// Limit ground truth to 25 Hz // Limit ground truth to 25 Hz
if (QGC::groundTimeMilliseconds() - simUpdateLast > 40) { if (QGC::groundTimeMilliseconds() - simUpdateLastGroundTruth > 40) {
emit hilGroundTruthChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed, emit hilGroundTruthChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed,
pitchspeed, yawspeed, lat, lon, alt, pitchspeed, yawspeed, lat, lon, alt,
vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc); vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc);
}
simUpdateLast = QGC::groundTimeMilliseconds(); simUpdateLastGroundTruth = QGC::groundTimeMilliseconds();
}
} }
if (!oldConnectionState && xPlaneConnected) if (!oldConnectionState && xPlaneConnected)
......
...@@ -207,6 +207,7 @@ protected: ...@@ -207,6 +207,7 @@ protected:
quint64 simUpdateLast; quint64 simUpdateLast;
quint64 simUpdateFirst; quint64 simUpdateFirst;
quint64 simUpdateLastText; quint64 simUpdateLastText;
quint64 simUpdateLastGroundTruth;
float simUpdateHz; float simUpdateHz;
bool _sensorHilEnabled; bool _sensorHilEnabled;
......
...@@ -1425,6 +1425,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -1425,6 +1425,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
case MAVLINK_MSG_ID_NAMED_VALUE_INT: case MAVLINK_MSG_ID_NAMED_VALUE_INT:
case MAVLINK_MSG_ID_MANUAL_CONTROL: case MAVLINK_MSG_ID_MANUAL_CONTROL:
case MAVLINK_MSG_ID_HIGHRES_IMU: case MAVLINK_MSG_ID_HIGHRES_IMU:
case MAVLINK_MSG_ID_DISTANCE_SENSOR:
break; break;
default: default:
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment