mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Filter ATIS query replies from normal text messages
Non-VATSIM FSD servers send the controller ATIS message as a regular text message. swift therefore could not recognize it as such and was handling the reply as any other text message. This changes adds some checks to detect ATIS replies after a query. Maniphest Tasks: T216
This commit is contained in:
committed by
Klaus Basan
parent
d68f678cc5
commit
8bb841398d
@@ -207,6 +207,10 @@ namespace BlackCore
|
||||
//! Send the consolidatedTextMessages
|
||||
void emitConsolidatedTextMessages();
|
||||
|
||||
//! Handles ATIS replies from non-VATSIM servers. If the conditions are not met, the message is
|
||||
//! released as normal text message.
|
||||
void maybeHandleAtisReply(const BlackMisc::Aviation::CCallsign &sender, const BlackMisc::Aviation::CCallsign &receiver, const QString &message);
|
||||
|
||||
//! Deletion policy for QScopedPointer
|
||||
struct VatFsdClientDeleter
|
||||
{
|
||||
@@ -239,6 +243,15 @@ namespace BlackCore
|
||||
static int const c_processingIntervalMsec = 100; //!< interval for the processing timer
|
||||
static int const c_updatePostionIntervalMsec = 5000; //!< interval for the position update timer (send our position to network)
|
||||
static int const c_updateInterimPostionIntervalMsec = 1000; //!< interval for iterim position updates (send our position as interim position)
|
||||
|
||||
struct PendingAtisQuery
|
||||
{
|
||||
QDateTime m_queryTime = QDateTime::currentDateTimeUtc();
|
||||
QStringList m_atisMessage;
|
||||
|
||||
};
|
||||
|
||||
QHash<BlackMisc::Aviation::CCallsign, PendingAtisQuery> m_pendingAtisQueries;
|
||||
};
|
||||
} //namespace
|
||||
} //namespace
|
||||
|
||||
Reference in New Issue
Block a user