Ref T566, matching log flag/enum to decide what is being logged

This commit is contained in:
Klaus Basan
2019-04-06 03:17:38 +02:00
committed by Mat Sutcliffe
parent 6bcc308916
commit 50d886791a
3 changed files with 109 additions and 45 deletions

View File

@@ -586,10 +586,10 @@ namespace BlackCore
// here we find the best simulator model for a resolved model
// in the first step we already tried to find accurate ICAO codes etc.
// coming from CAirspaceMonitor::sendReadyForModelMatching
bool shortLog = false;
CAircraftMatcher::MatchingLog whatToLog = CAircraftMatcher::LogAll;
CStatusMessageList matchingMessages;
CStatusMessageList *pMatchingMessages = m_enableMatchingMessages ? &matchingMessages : nullptr;
CAircraftModel aircraftModel = m_aircraftMatcher.getClosestMatch(remoteAircraft, shortLog, pMatchingMessages);
CAircraftModel aircraftModel = m_aircraftMatcher.getClosestMatch(remoteAircraft, whatToLog, pMatchingMessages);
Q_ASSERT_X(remoteAircraft.getCallsign() == aircraftModel.getCallsign(), Q_FUNC_INFO, "Mismatching callsigns");
const CLength cg = m_simulatorPlugin.second->getCGPerModelString(aircraftModel.getModelString());
if (!cg.isNull()) { aircraftModel.setCG(cg); }