mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T270, Ref T268, plugin common / simulator improvements
* connect with "about to quit" * added interface declarations * sim statistics, use common function setStatsRemoteAircraftUpdate and double for average values
This commit is contained in:
@@ -702,6 +702,7 @@ namespace BlackSimPlugin
|
||||
if (remoteAircraftNo < 1) { return; }
|
||||
|
||||
// values used for position and parts
|
||||
m_updateRemoteAircraftInProgress = true;
|
||||
const qint64 currentTimestamp = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
// interpolation for all remote aircraft
|
||||
@@ -776,10 +777,8 @@ namespace BlackSimPlugin
|
||||
m_trafficProxy->setPlanesSurfaces(planesSurfaces);
|
||||
}
|
||||
|
||||
const qint64 dt = QDateTime::currentMSecsSinceEpoch() - currentTimestamp;
|
||||
m_statsUpdateAircraftTimeTotalMs += dt;
|
||||
m_statsUpdateAircraftCountMs++;
|
||||
m_statsUpdateAircraftTimeAvgMs = m_statsUpdateAircraftTimeTotalMs / m_statsUpdateAircraftCountMs;
|
||||
// stats
|
||||
this->setStatsRemoteAircraftUpdate(currentTimestamp);
|
||||
}
|
||||
|
||||
void CSimulatorXPlane::requestRemoteAircraftDataFromXPlane()
|
||||
|
||||
Reference in New Issue
Block a user