This commit is contained in:
Klaus Basan
2019-07-16 19:34:35 +02:00
committed by Mat Sutcliffe
parent ac22e1d17d
commit b8ba7940ff
2 changed files with 5 additions and 3 deletions

View File

@@ -629,6 +629,8 @@ namespace BlackSimPlugin
m_addingInProgressAircraft.insert(newRemoteAircraft.getCallsign(), now);
const QString callsign = newRemoteAircraft.getCallsign().asString();
CAircraftModel aircraftModel = newRemoteAircraft.getModel();
// some more validation
if (aircraftModel.getCallsign() != newRemoteAircraft.getCallsign())
{
CLogMessage(this).warning(u"Model for '%1' has no callsign, maybe using a default model") << callsign;
@@ -1045,8 +1047,8 @@ namespace BlackSimPlugin
{
wasPending = true;
const qint64 wasStartedMs = m_addingInProgressAircraft.value(cs);
const qint64 deltaTimeMs = QDateTime::currentMSecsSinceEpoch() - wasStartedMs;
m_statsAddCurrentTimeMs = deltaTimeMs;
const qint64 deltaTimeMs = QDateTime::currentMSecsSinceEpoch() - wasStartedMs;
m_statsAddCurrentTimeMs = deltaTimeMs;
if (deltaTimeMs > m_statsAddMaxTimeMs) { m_statsAddMaxTimeMs = deltaTimeMs; }
m_addingInProgressAircraft.remove(cs);
}

View File

@@ -209,7 +209,7 @@ namespace BlackSimPlugin
//! Timestamps of aircraft currently adding
QPair<qint64, qint64> minMaxTimestampsAddInProgress() const;
//! Can the next aircraft be added?
//! Can the next aircraft be added? No other aircraft adding in progress?
bool canAddAircraft() const;
//! Callbacks from simulator @{