Improved logging of "adding aircraft" so we can see details such as the model string

This commit is contained in:
Klaus Basan
2019-08-11 20:05:16 +02:00
committed by Mat Sutcliffe
parent d947baf344
commit 26afc5160d
8 changed files with 18 additions and 5 deletions

View File

@@ -313,6 +313,8 @@ namespace BlackSimPlugin
aircraft.setRendered(true);
const CCallsign cs = aircraft.getCallsign();
m_interpolators.insert(cs, CInterpolatorMultiWrapper(cs, this, this, this->getRemoteAircraftProvider(), &m_interpolationLogger));
this->logAddingAircraftModel(aircraft);
m_renderedAircraft.push_back(aircraft); // my simulator list
this->updateAircraftRendered(cs, true); // in provider
emit this->aircraftRenderingChanged(aircraft);

View File

@@ -490,7 +490,7 @@ namespace BlackSimPlugin
if (this->canAddAircraft())
{
// no aircraft pending, add
CLogMessage(this).info(u"Adding '%1' to Flightgear") << newRemoteAircraft.getCallsign();
this->logAddingAircraftModel(newRemoteAircraft);
const qint64 now = QDateTime::currentMSecsSinceEpoch();
m_addingInProgressAircraft.insert(newRemoteAircraft.getCallsign(), now);
const QString callsign = newRemoteAircraft.getCallsign().asString();

View File

@@ -167,6 +167,8 @@ namespace BlackSimPlugin
bool CSimulatorFs9::physicallyAddRemoteAircraft(const CSimulatedAircraft &newRemoteAircraft)
{
const CCallsign callsign = newRemoteAircraft.getCallsign();
this->logAddingAircraftModel(newRemoteAircraft);
if (m_hashFs9Clients.contains(callsign))
{
// already exists, remove first
@@ -188,7 +190,7 @@ namespace BlackSimPlugin
{
emit aircraftRenderingChanged(remoteAircraftCopy);
}
CLogMessage(this).info(u"FS9: Added aircraft %1") << callsign.toQString();
CLogMessage(this).info(u"FS9: Added aircraft '%1'") << callsign.toQString();
return true;
}

View File

@@ -140,6 +140,7 @@ namespace BlackSimPlugin
bool CSimulatorFsxCommon::physicallyAddRemoteAircraft(const CSimulatedAircraft &newRemoteAircraft)
{
this->logAddingAircraftModel(newRemoteAircraft);
return this->physicallyAddRemoteAircraftImpl(newRemoteAircraft, ExternalCall);
}

View File

@@ -652,7 +652,7 @@ namespace BlackSimPlugin
if (this->canAddAircraft())
{
// no aircraft pending, add
CLogMessage(this).info(u"Adding '%1' to XPlane") << newRemoteAircraft.getCallsign();
this->logAddingAircraftModel(newRemoteAircraft);
const qint64 now = QDateTime::currentMSecsSinceEpoch();
m_addingInProgressAircraft.insert(newRemoteAircraft.getCallsign(), now);
const QString callsign = newRemoteAircraft.getCallsign().asString();