mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Style
This commit is contained in:
@@ -497,13 +497,13 @@ namespace BlackCore
|
||||
const int r2 = modelsCleaned.removeIfExcluded();
|
||||
if ((r1 + r2) > 0)
|
||||
{
|
||||
CLogMessage(this).warning("Removed models for matcher, without string '%1', excluded '%2'") << r1 << r2;
|
||||
CLogMessage(this).warning("Removed models for matcher, without string #: %1, excluded #: %2") << r1 << r2;
|
||||
if (r1 > 0) { CLogMessage(this).warning("Without string: %1") << models.findEmptyModelStrings().getModelStringList().join(", "); }
|
||||
if (r2 > 0) { CLogMessage(this).warning("Excluded: %1") << models.findByModelMode(CAircraftModel::Exclude).getModelStringList().join(", "); }
|
||||
}
|
||||
if (modelsCleaned.isEmpty())
|
||||
{
|
||||
CLogMessage(this).error("No models for matching, swift without a model set will not work");
|
||||
CLogMessage(this).error("No models for matching, swift without a model set will not work!");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -921,25 +921,25 @@ namespace BlackCore
|
||||
reduced = false;
|
||||
if (inList.isEmpty())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " " + "Empty input list, cannot reduce", getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " " + "Empty input list, cannot reduce", getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
const QString m = remoteAircraft.getAircraftIcaoCode().getManufacturer();
|
||||
if (m.isEmpty())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " No manufacturer, cannot reduce " + QString::number(inList.size()) + " entries", getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " No manufacturer, cannot reduce " + QString::number(inList.size()) + " entries", getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
const CAircraftModelList outList(inList.findByManufacturer(m));
|
||||
if (outList.isEmpty())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " Not found " + m + ", cannot reduce", getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " Not found " + m + ", cannot reduce", getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " Reduced by " + m + " results: " + QString::number(outList.size()), getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " Reduced by " + m + " results: " + QString::number(outList.size()), getLogCategories()); }
|
||||
reduced = true;
|
||||
return outList;
|
||||
}
|
||||
@@ -977,24 +977,24 @@ namespace BlackCore
|
||||
reduced = false;
|
||||
if (inList.isEmpty())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " " + "Empty input list, cannot reduce", getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " " + "Empty input list, cannot reduce", getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
if (!remoteAircraft.hasAirlineDesignator())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " " + "No airline, cannot reduce " + QString::number(inList.size()) + " entries", getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " " + "No airline, cannot reduce " + QString::number(inList.size()) + " entries", getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
const CAircraftModelList outList(inList.findByIcaoDesignators(CAircraftIcaoCode(), remoteAircraft.getAirlineIcaoCode()));
|
||||
if (outList.isEmpty())
|
||||
{
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " Cannot reduce by " + remoteAircraft.getAirlineIcaoCodeDesignator() + " results: " + QString::number(outList.size()), getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " Cannot reduce by " + remoteAircraft.getAirlineIcaoCodeDesignator() + " results: " + QString::number(outList.size()), getLogCategories()); }
|
||||
return inList;
|
||||
}
|
||||
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log , remoteAircraft, info + " Reduced reduce by " + remoteAircraft.getAirlineIcaoCodeDesignator() + " to " + QString::number(outList.size()), getLogCategories()); }
|
||||
if (log) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, info + " Reduced reduce by " + remoteAircraft.getAirlineIcaoCodeDesignator() + " to " + QString::number(outList.size()), getLogCategories()); }
|
||||
reduced = true;
|
||||
return outList;
|
||||
}
|
||||
|
||||
@@ -125,9 +125,11 @@ namespace BlackCore
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Create dummy entries for performance tests
|
||||
//! \private for testing purposes
|
||||
void testCreateDummyOnlineAtcStations(int number);
|
||||
|
||||
//! Test injected aircraft parts
|
||||
//! \private for testing purposes
|
||||
void testAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftParts &parts, bool incremental);
|
||||
|
||||
signals:
|
||||
@@ -141,6 +143,8 @@ namespace BlackCore
|
||||
void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &station, bool isConnected);
|
||||
|
||||
//! Raw data as received from network
|
||||
//! \remark used for statistics
|
||||
//! \private
|
||||
void requestedNewAircraft(const BlackMisc::Aviation::CCallsign &callsign, const QString &aircraftDesignator, const QString &airlineDesignator, const QString &livery);
|
||||
|
||||
//! Ready for model matching
|
||||
|
||||
@@ -276,7 +276,7 @@ namespace BlackCore
|
||||
qint64 m_statsCurrentUpdateTimeMs = 0; //!< statistics current update time
|
||||
qint64 m_statsMaxUpdateTimeMs = 0; //!< statistics max.update time
|
||||
qint64 m_statsLastUpdateAircraftRequestedMs = 0; //!< when was the last aircraft update requested
|
||||
qint64 m_statsUpdateAircraftRequestedDeltaMs = 0; //!< delta time between 2 aircrat updates
|
||||
qint64 m_statsUpdateAircraftRequestedDeltaMs = 0; //!< delta time between 2 aircraft updates
|
||||
|
||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log.interpolation
|
||||
@@ -297,7 +297,7 @@ namespace BlackCore
|
||||
//! Limited as CSimulatorCommon::isUpdateAircraftLimited plus updating statistics
|
||||
bool isUpdateAircraftLimitedWithStats(qint64 startTime = -1);
|
||||
|
||||
//! Limit to updates per seconds
|
||||
//! Limit to updates per second
|
||||
bool limitToUpdatesPerSecond(int numberPerSecond);
|
||||
|
||||
// weather
|
||||
|
||||
Reference in New Issue
Block a user