mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +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->setObjectName("CAirspaceMonitor");
|
||||||
this->enableReverseLookupMessages(sApp->isDeveloperFlagSet() || CBuildConfig::isLocalDeveloperDebugBuild() ? RevLogEnabled : RevLogEnabledSimplified);
|
this->enableReverseLookupMessages(sApp->isDeveloperFlagSet() || CBuildConfig::isLocalDeveloperDebugBuild() ? RevLogEnabled : RevLogEnabledSimplified);
|
||||||
|
|
||||||
connect(m_fsdClient, &CFSDClient::atcDataUpdateReceived, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
|
||||||
// FSD TODO
|
// FSD TODO
|
||||||
|
connect(m_fsdClient, &CFSDClient::atcDataUpdateReceived, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
||||||
connect(m_fsdClient, &CFSDClient::atisReplyReceived, this, &CAirspaceMonitor::onAtisReceived);
|
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::atisLogoffTimeReplyReceived, this, &CAirspaceMonitor::onAtisLogoffTimeReceived);
|
||||||
connect(m_fsdClient, &CFSDClient::flightPlanReceived, this, &CAirspaceMonitor::onFlightPlanReceived);
|
connect(m_fsdClient, &CFSDClient::flightPlanReceived, this, &CAirspaceMonitor::onFlightPlanReceived);
|
||||||
connect(m_fsdClient, &CFSDClient::realNameResponseReceived, this, &CAirspaceMonitor::onRealNameReplyReceived);
|
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::aircraftConfigReceived, this, &CAirspaceMonitor::onAircraftConfigReceived);
|
||||||
connect(m_fsdClient, &CFSDClient::connectionStatusChanged, this, &CAirspaceMonitor::onConnectionStatusChanged);
|
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
|
// AutoConnection: this should also avoid race conditions by updating the bookings
|
||||||
Q_ASSERT_X(sApp && sApp->getWebDataServices(), Q_FUNC_INFO, "Missing data reader");
|
Q_ASSERT_X(sApp && sApp->getWebDataServices(), Q_FUNC_INFO, "Missing data reader");
|
||||||
|
|
||||||
// optional readers
|
// 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::atcBookingsRead, this, &CAirspaceMonitor::onReceivedAtcBookings);
|
||||||
connect(sApp->getWebDataServices()->getBookingReader(), &CVatsimBookingReader::atcBookingsReadUnchanged, this, &CAirspaceMonitor::onReadUnchangedAtcBookings);
|
connect(sApp->getWebDataServices()->getBookingReader(), &CVatsimBookingReader::atcBookingsReadUnchanged, this, &CAirspaceMonitor::onReadUnchangedAtcBookings);
|
||||||
@@ -734,7 +736,11 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
||||||
if (!this->isConnectedAndNotShuttingDown()) { return; }
|
if (!this->isConnectedAndNotShuttingDown()) { return; }
|
||||||
|
return;
|
||||||
|
Q_UNUSED(url)
|
||||||
|
Q_UNUSED(callsign)
|
||||||
|
|
||||||
|
/**
|
||||||
// URL
|
// URL
|
||||||
const QString trimmedUrl = url.trimmed();
|
const QString trimmedUrl = url.trimmed();
|
||||||
CPropertyIndexVariantMap vm({ CAtcStation::IndexVoiceRoom, CVoiceRoom::IndexUrl }, trimmedUrl);
|
CPropertyIndexVariantMap vm({ CAtcStation::IndexVoiceRoom, CVoiceRoom::IndexUrl }, trimmedUrl);
|
||||||
@@ -754,6 +760,7 @@ namespace BlackCore
|
|||||||
vm = CPropertyIndexVariantMap(CClient::IndexVoiceCapabilities, CVariant::from(CVoiceCapabilities::fromVoiceCapabilities(CVoiceCapabilities::Voice)));
|
vm = CPropertyIndexVariantMap(CClient::IndexVoiceCapabilities, CVariant::from(CVoiceCapabilities::fromVoiceCapabilities(CVoiceCapabilities::Voice)));
|
||||||
this->updateOrAddClient(callsign, vm, false);
|
this->updateOrAddClient(callsign, vm, false);
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAirspaceMonitor::onAtisLogoffTimeReceived(const CCallsign &callsign, const QString &zuluTime)
|
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
|
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::Settings::TModelMatching> m_matchingSettings { this }; //!< settings
|
||||||
QQueue<BlackMisc::Aviation::CCallsign> m_queryAtis; //!< query the ATIS
|
QQueue<BlackMisc::Aviation::CCallsign> m_queryAtis; //!< query the ATIS
|
||||||
QQueue<BlackMisc::Aviation::CCallsign> m_queryPilot; //!< query the pilot data
|
QQueue<BlackMisc::Aviation::CCallsign> m_queryPilot; //!< query the pilot data
|
||||||
Fsd::CFSDClient *m_fsdClient = nullptr; //!< corresponding network interface
|
Fsd::CFSDClient *m_fsdClient = nullptr; //!< corresponding network interface
|
||||||
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
|
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
|
bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal
|
||||||
QTimer m_processTimer;
|
QTimer m_processTimer;
|
||||||
static constexpr int ProcessInterval = 50; // in ms
|
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 onFlightPlanReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CFlightPlan &flightPlan);
|
||||||
void onAtcControllerDisconnected(const BlackMisc::Aviation::CCallsign &callsign);
|
void onAtcControllerDisconnected(const BlackMisc::Aviation::CCallsign &callsign);
|
||||||
void onAtisReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CInformationMessage &atisMessage);
|
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 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 onIcaoCodesReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &aircraftIcaoDesignator, const QString &airlineIcaoDesignator, const QString &livery);
|
||||||
void onPilotDisconnected(const BlackMisc::Aviation::CCallsign &callsign);
|
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 onAircraftConfigReceived(const BlackMisc::Aviation::CCallsign &callsign, const QJsonObject &jsonObject, qint64 currentOffsetMs);
|
||||||
void onAircraftInterimUpdateReceived(const BlackMisc::Aviation::CAircraftSituation &situation);
|
void onAircraftInterimUpdateReceived(const BlackMisc::Aviation::CAircraftSituation &situation);
|
||||||
void onConnectionStatusChanged(BlackMisc::Network::CConnectionStatus oldStatus, BlackMisc::Network::CConnectionStatus newStatus);
|
void onConnectionStatusChanged(BlackMisc::Network::CConnectionStatus oldStatus, BlackMisc::Network::CConnectionStatus newStatus);
|
||||||
|
|
||||||
|
//! \deprecated
|
||||||
|
void onAtisVoiceRoomReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &url);
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ namespace BlackGui
|
|||||||
CColumn col("type", CAtcStation::IndexIcon);
|
CColumn col("type", CAtcStation::IndexIcon);
|
||||||
col.setSortPropertyIndex({ CAtcStation::IndexCallsign, CCallsign::IndexSuffix });
|
col.setSortPropertyIndex({ CAtcStation::IndexCallsign, CCallsign::IndexSuffix });
|
||||||
m_columns.addColumn(col);
|
m_columns.addColumn(col);
|
||||||
|
m_columns.addColumn(CColumn("xc.", "AFV cross coupled", CAtcStation::IndexIsAfvCrossCoupled, new CBoolIconFormatter("AFV cross coupled", "not coupled")));
|
||||||
m_columns.addColumn(CColumn("distance", CAtcStation::IndexRelativeDistance, new CAirspaceDistanceFormatter()));
|
m_columns.addColumn(CColumn("distance", CAtcStation::IndexRelativeDistance, new CAirspaceDistanceFormatter()));
|
||||||
m_columns.addColumn(CColumn("frequency", CAtcStation::IndexFrequency, new CComFrequencyFormatter()));
|
m_columns.addColumn(CColumn("frequency", CAtcStation::IndexFrequency, new CComFrequencyFormatter()));
|
||||||
m_columns.addColumn(CColumn("r.", "in range", CAtcStation::IndexIsInRange, new CBoolIconFormatter("in range", "outside range")));
|
m_columns.addColumn(CColumn("r.", "in range", CAtcStation::IndexIsInRange, new CBoolIconFormatter("in range", "outside range")));
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
m_callsign = callsign;
|
m_callsign = callsign;
|
||||||
m_controller.setCallsign(callsign);
|
m_controller.setCallsign(callsign);
|
||||||
|
m_isAfvCrossCoupled = callsign.getStringAsSet().startsWith('*');
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CAtcStation::getCallsignAndControllerRealName() const
|
QString CAtcStation::getCallsignAndControllerRealName() const
|
||||||
|
|||||||
Reference in New Issue
Block a user