mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Improved ATIS update in ATC station component
* signal for ATIS received * reload ATC statiosns when ATIS changes
This commit is contained in:
committed by
Roland Winklmeier
parent
0b7706471c
commit
ae8d9abf0d
@@ -88,6 +88,7 @@ namespace BlackCore
|
||||
connect(m_airspace, &CAirspaceMonitor::removedAircraft, this, &IContextNetwork::removedAircraft); // DBus
|
||||
connect(m_airspace, &CAirspaceMonitor::readyForModelMatching, this, &CContextNetwork::readyForModelMatching);
|
||||
connect(m_airspace, &CAirspaceMonitor::addedAircraft, this, &CContextNetwork::addedAircraft);
|
||||
connect(m_airspace, &CAirspaceMonitor::atisReceived, this, &CContextNetwork::onAtisReceived);
|
||||
}
|
||||
|
||||
CContextNetwork *CContextNetwork::registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
@@ -489,6 +490,12 @@ namespace BlackCore
|
||||
CLogMessage(this).info("%1 METARs updated") << metars.size();
|
||||
}
|
||||
|
||||
void CContextNetwork::onAtisReceived(const CCallsign &callsign)
|
||||
{
|
||||
Q_UNUSED(callsign);
|
||||
m_dsAtcStationsOnlineChanged.inputSignal(); // the ATIS data are stored in the station object
|
||||
}
|
||||
|
||||
void CContextNetwork::checkForSupervisiorTextMessage(const CTextMessageList &messages)
|
||||
{
|
||||
if (messages.containsPrivateMessages())
|
||||
|
||||
@@ -231,9 +231,9 @@ namespace BlackCore
|
||||
QTimer *m_networkDataUpdateTimer = nullptr; //!< general updates such as ATIS, frequencies, see requestDataUpdates()
|
||||
|
||||
// Digest signals, only sending after some time
|
||||
BlackMisc::CDigestSignal m_dsAtcStationsBookedChanged { this, &IContextNetwork::changedAtcStationsBooked, &IContextNetwork::changedAtcStationsBookedDigest, 750, 2 };
|
||||
BlackMisc::CDigestSignal m_dsAtcStationsOnlineChanged { this, &IContextNetwork::changedAtcStationsOnline, &IContextNetwork::changedAtcStationsOnlineDigest, 750, 4 };
|
||||
BlackMisc::CDigestSignal m_dsAircraftsInRangeChanged { this, &IContextNetwork::changedAircraftInRange, &IContextNetwork::changedAircraftInRangeDigest, 750, 4 };
|
||||
BlackMisc::CDigestSignal m_dsAtcStationsBookedChanged { this, &IContextNetwork::changedAtcStationsBooked, &IContextNetwork::changedAtcStationsBookedDigest, 1000, 2 };
|
||||
BlackMisc::CDigestSignal m_dsAtcStationsOnlineChanged { this, &IContextNetwork::changedAtcStationsOnline, &IContextNetwork::changedAtcStationsOnlineDigest, 1000, 4 };
|
||||
BlackMisc::CDigestSignal m_dsAircraftsInRangeChanged { this, &IContextNetwork::changedAircraftInRange, &IContextNetwork::changedAircraftInRangeDigest, 1000, 4 };
|
||||
|
||||
//! Own aircraft from \sa CContextOwnAircraft
|
||||
const BlackMisc::Simulation::CSimulatedAircraft ownAircraft() const;
|
||||
@@ -241,6 +241,9 @@ namespace BlackCore
|
||||
//! Update METAR collection
|
||||
void updateMetars(const BlackMisc::Weather::CMetarList &metars);
|
||||
|
||||
//! An ATIS has been received
|
||||
void onAtisReceived(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Check if a supervisor message was received
|
||||
void checkForSupervisiorTextMessage(const BlackMisc::Network::CTextMessageList &messages);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user