mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Ref T730, adjusted airspace monitor and ATC model
* added cross coupled in model * "disabled" onAtisVoiceRoomReceived
This commit is contained in:
committed by
Mat Sutcliffe
parent
e560be65a6
commit
dcfe275cc1
@@ -75,10 +75,9 @@ namespace BlackCore
|
||||
this->setObjectName("CAirspaceMonitor");
|
||||
this->enableReverseLookupMessages(sApp->isDeveloperFlagSet() || CBuildConfig::isLocalDeveloperDebugBuild() ? RevLogEnabled : RevLogEnabledSimplified);
|
||||
|
||||
connect(m_fsdClient, &CFSDClient::atcDataUpdateReceived, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
||||
// FSD TODO
|
||||
connect(m_fsdClient, &CFSDClient::atcDataUpdateReceived, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
||||
connect(m_fsdClient, &CFSDClient::atisReplyReceived, this, &CAirspaceMonitor::onAtisReceived);
|
||||
connect(m_fsdClient, &CFSDClient::atisVoiceRoomReplyReceived, this, &CAirspaceMonitor::onAtisVoiceRoomReceived);
|
||||
connect(m_fsdClient, &CFSDClient::atisLogoffTimeReplyReceived, this, &CAirspaceMonitor::onAtisLogoffTimeReceived);
|
||||
connect(m_fsdClient, &CFSDClient::flightPlanReceived, this, &CAirspaceMonitor::onFlightPlanReceived);
|
||||
connect(m_fsdClient, &CFSDClient::realNameResponseReceived, this, &CAirspaceMonitor::onRealNameReplyReceived);
|
||||
@@ -94,11 +93,14 @@ namespace BlackCore
|
||||
connect(m_fsdClient, &CFSDClient::aircraftConfigReceived, this, &CAirspaceMonitor::onAircraftConfigReceived);
|
||||
connect(m_fsdClient, &CFSDClient::connectionStatusChanged, this, &CAirspaceMonitor::onConnectionStatusChanged);
|
||||
|
||||
// No longer existing with AFV
|
||||
// connect(m_fsdClient, &CFSDClient::atisVoiceRoomReplyReceived, this, &CAirspaceMonitor::onAtisVoiceRoomReceived);
|
||||
|
||||
// AutoConnection: this should also avoid race conditions by updating the bookings
|
||||
Q_ASSERT_X(sApp && sApp->getWebDataServices(), Q_FUNC_INFO, "Missing data reader");
|
||||
|
||||
// optional readers
|
||||
if (sApp->getWebDataServices()->getBookingReader())
|
||||
if (sApp && sApp->getWebDataServices()->getBookingReader())
|
||||
{
|
||||
connect(sApp->getWebDataServices()->getBookingReader(), &CVatsimBookingReader::atcBookingsRead, this, &CAirspaceMonitor::onReceivedAtcBookings);
|
||||
connect(sApp->getWebDataServices()->getBookingReader(), &CVatsimBookingReader::atcBookingsReadUnchanged, this, &CAirspaceMonitor::onReadUnchangedAtcBookings);
|
||||
@@ -734,7 +736,11 @@ namespace BlackCore
|
||||
{
|
||||
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
||||
if (!this->isConnectedAndNotShuttingDown()) { return; }
|
||||
return;
|
||||
Q_UNUSED(url)
|
||||
Q_UNUSED(callsign)
|
||||
|
||||
/**
|
||||
// URL
|
||||
const QString trimmedUrl = url.trimmed();
|
||||
CPropertyIndexVariantMap vm({ CAtcStation::IndexVoiceRoom, CVoiceRoom::IndexUrl }, trimmedUrl);
|
||||
@@ -754,6 +760,7 @@ namespace BlackCore
|
||||
vm = CPropertyIndexVariantMap(CClient::IndexVoiceCapabilities, CVariant::from(CVoiceCapabilities::fromVoiceCapabilities(CVoiceCapabilities::Voice)));
|
||||
this->updateOrAddClient(callsign, vm, false);
|
||||
}
|
||||
**/
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::onAtisLogoffTimeReceived(const CCallsign &callsign, const QString &zuluTime)
|
||||
|
||||
@@ -257,9 +257,9 @@ namespace BlackCore
|
||||
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
|
||||
Fsd::CFSDClient *m_fsdClient = nullptr; //!< corresponding network interface
|
||||
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
|
||||
bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal
|
||||
Fsd::CFSDClient *m_fsdClient = nullptr; //!< corresponding network interface
|
||||
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
|
||||
bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal
|
||||
QTimer m_processTimer;
|
||||
static constexpr int ProcessInterval = 50; // in ms
|
||||
|
||||
@@ -377,7 +377,6 @@ namespace BlackCore
|
||||
void onFlightPlanReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CFlightPlan &flightPlan);
|
||||
void onAtcControllerDisconnected(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
void onAtisReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CInformationMessage &atisMessage);
|
||||
void onAtisVoiceRoomReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &url);
|
||||
void onAtisLogoffTimeReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &zuluTime);
|
||||
void onIcaoCodesReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &aircraftIcaoDesignator, const QString &airlineIcaoDesignator, const QString &livery);
|
||||
void onPilotDisconnected(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
@@ -388,6 +387,9 @@ namespace BlackCore
|
||||
void onAircraftConfigReceived(const BlackMisc::Aviation::CCallsign &callsign, const QJsonObject &jsonObject, qint64 currentOffsetMs);
|
||||
void onAircraftInterimUpdateReceived(const BlackMisc::Aviation::CAircraftSituation &situation);
|
||||
void onConnectionStatusChanged(BlackMisc::Network::CConnectionStatus oldStatus, BlackMisc::Network::CConnectionStatus newStatus);
|
||||
|
||||
//! \deprecated
|
||||
void onAtisVoiceRoomReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &url);
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user