mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T773, validate received network data again
* ff no ICAO data are received, the model is not "ready for matching" * in that case we verify the situation and query ICAO data again * now we have to verify again, to see if the 2nd query suceeded (otherwise dangling)
This commit is contained in:
committed by
Mat Sutcliffe
parent
687d003bb9
commit
9bcc16b94e
@@ -675,7 +675,7 @@ namespace BlackCore
|
||||
{
|
||||
static const QString readyForMatching("Ready (%1) for matching callsign '%2' with model type '%3', ICAO: '%4' '%5'");
|
||||
|
||||
readiness.setFlag(ReadyForMatchingSent); // stored as readiness as reference
|
||||
readiness.setFlag(ReadyForMatchingSent); // stored in readiness as reference
|
||||
const QString readyMsg = readyForMatching.arg(readiness.toQString(), callsign.toQString(), remoteAircraft.getModel().getModelTypeAsString(), remoteAircraft.getAircraftIcaoCode().getDesignatorDbKey(), remoteAircraft.getAirlineIcaoCode().getDesignatorDbKey());
|
||||
const CStatusMessage m = CLogUtilities::logMessage(callsign, readyMsg, getLogCategories());
|
||||
this->addReverseLookupMessage(callsign, m);
|
||||
@@ -711,6 +711,16 @@ namespace BlackCore
|
||||
{
|
||||
CLogMessage(this).info(u"Query ICAO codes for '%1' again") << callsign;
|
||||
this->sendInitialPilotQueries(callsign, true, true);
|
||||
|
||||
// if the queries now yield a result all will be fine
|
||||
// otherwise we need to check again
|
||||
const QPointer<CAirspaceMonitor> myself(this);
|
||||
QTimer::singleShot(MMVerifyMs, this, [ = ]()
|
||||
{
|
||||
// makes sure we have ICAO data
|
||||
if (!myself || !sApp || sApp->isShuttingDown()) { return; }
|
||||
this->verifyReceivedIcaoData(callsign);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,9 +282,9 @@ namespace BlackCore
|
||||
|
||||
BlackMisc::Aviation::CAtcStationList m_atcStationsOnline; //!< online ATC stations
|
||||
BlackMisc::Aviation::CAtcStationList m_atcStationsBooked; //!< booked ATC stations
|
||||
QHash<BlackMisc::Aviation::CCallsign, FsInnPacket> m_tempFsInnPackets;
|
||||
QHash<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> m_flightPlanCache; //!< flight plan information retrieved from network and cached
|
||||
QHash<BlackMisc::Aviation::CCallsign, Readiness> m_readiness; //!< readiness
|
||||
QHash<BlackMisc::Aviation::CCallsign, FsInnPacket> m_tempFsInnPackets; //!< unhandled FsInn packets
|
||||
QHash<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> m_flightPlanCache; //!< flight plan information retrieved from network and cached
|
||||
QHash<BlackMisc::Aviation::CCallsign, Readiness> m_readiness; //!< readiness
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::Settings::TModelMatching> m_matchingSettings { this }; //!< settings
|
||||
QQueue<BlackMisc::Aviation::CCallsign> m_queryAtis; //!< query the ATIS
|
||||
QQueue<BlackMisc::Aviation::CCallsign> m_queryPilot; //!< query the pilot data
|
||||
|
||||
Reference in New Issue
Block a user