mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Improved logging of "adding aircraft" so we can see details such as the model string
This commit is contained in:
committed by
Mat Sutcliffe
parent
d947baf344
commit
26afc5160d
@@ -174,7 +174,7 @@ namespace BlackCore
|
||||
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAircraftEpochMs + 1000; } // fake value so it can be re-enabled
|
||||
const qint64 tsv = m_aircraftCallsignTimestamps.value(callsign);
|
||||
if (tsv > timeoutAircraftEpochMs) { continue; }
|
||||
CLogMessage(this).debug() << "Aircraft " << callsign.toQString() << "timed out! " << (currentTimeMsEpoch - tsv) << "ms";
|
||||
CLogMessage(this).debug() << QStringLiteral("Aircraft '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
|
||||
m_aircraftCallsignTimestamps.remove(callsign);
|
||||
emit this->timeoutAircraft(callsign);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ namespace BlackCore
|
||||
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAtcEpochMs + 1000; } // fake value so it can be re-enabled
|
||||
const qint64 tsv = m_aircraftCallsignTimestamps.value(callsign);
|
||||
if (m_atcCallsignTimestamps.value(callsign) > timeoutAtcEpochMs) { continue; }
|
||||
CLogMessage(this).debug() << "ATC " << callsign.toQString() << "timed out! " << (currentTimeMsEpoch - tsv) << "ms";
|
||||
CLogMessage(this).debug() << QStringLiteral("ATC '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
|
||||
m_atcCallsignTimestamps.remove(callsign);
|
||||
emit this->timeoutAtc(callsign);
|
||||
}
|
||||
|
||||
@@ -1186,6 +1186,11 @@ namespace BlackCore
|
||||
return true;
|
||||
}
|
||||
|
||||
void ISimulator::logAddingAircraftModel(const CSimulatedAircraft &aircraft) const
|
||||
{
|
||||
CLogMessage(this).info(u"Adding '%1' '%2' to '%3'") << aircraft.getCallsign() << aircraft.getModel().getModelStringAndDbKey() << this->getSimulatorInfo().toQString(true);
|
||||
}
|
||||
|
||||
QString ISimulator::latestLoggedDataFormatted(const CCallsign &cs) const
|
||||
{
|
||||
const SituationLog s = m_interpolationLogger.getLastSituationLog(cs);
|
||||
|
||||
@@ -548,6 +548,9 @@ namespace BlackCore
|
||||
//! Validate if model has callsign and such
|
||||
bool validateModelOfAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
|
||||
|
||||
//! Unified qeeing aircraft message
|
||||
void logAddingAircraftModel(const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
|
||||
|
||||
//! Lookup against DB data
|
||||
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user