fix: Remove broken ATC station booking overview

Related to #252
This commit is contained in:
Lars Toenning
2024-01-25 11:19:58 +01:00
parent 945ef36151
commit 9f50aaaa4a
39 changed files with 62 additions and 972 deletions

View File

@@ -114,12 +114,6 @@ namespace BlackCore::Context
//! Digest signal changedAtcStationsOnline()
void changedAtcStationsOnlineDigest();
//! ATC station (booked) list has been changed
void changedAtcStationsBooked();
//! Digest signal changedAtcStationsBooked()
void changedAtcStationsBookedDigest();
//! Aircraft list has been changed
void changedAircraftInRange();
@@ -170,9 +164,6 @@ namespace BlackCore::Context
void textMessageSent(const BlackMisc::Network::CTextMessage &sentMessage);
public slots:
//! Reload bookings from booking service
virtual void requestAtcBookingsUpdate() const = 0;
//! The ATC list with online ATC controllers
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const = 0;
@@ -181,9 +172,6 @@ namespace BlackCore::Context
//! \remark sorted by distance, nearest first
virtual BlackMisc::Aviation::CAtcStationList getClosestAtcStationsOnline(int number) const = 0;
//! ATC list, with booked controllers
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsBooked(bool recalculateDistance) const = 0;
//! Aircraft list
virtual BlackMisc::Simulation::CSimulatedAircraftList getAircraftInRange() const = 0;

View File

@@ -24,12 +24,6 @@ namespace BlackCore::Context
CContextNetworkEmpty(CCoreFacade *runtime) : IContextNetwork(CCoreFacadeConfig::NotUsed, runtime) {}
public slots:
//! \copydoc IContextNetwork::requestAtcBookingsUpdate()
virtual void requestAtcBookingsUpdate() const override
{
logEmptyContextWarning(Q_FUNC_INFO);
}
//! \copydoc IContextNetwork::getAtcStationsOnline()
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const override
{
@@ -46,14 +40,6 @@ namespace BlackCore::Context
return BlackMisc::Aviation::CAtcStationList();
}
//! \copydoc IContextNetwork::getAtcStationsBooked()
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsBooked(bool recalculateDistance) const override
{
Q_UNUSED(recalculateDistance)
logEmptyContextWarning(Q_FUNC_INFO);
return BlackMisc::Aviation::CAtcStationList();
}
//! \copydoc IContextNetwork::getAircraftInRange()
virtual BlackMisc::Simulation::CSimulatedAircraftList getAircraftInRange() const override
{

View File

@@ -99,7 +99,6 @@ namespace BlackCore::Context
m_fsdClient->setClientProvider(m_airspace);
connect(m_airspace, &CAirspaceMonitor::changedAtcStationOnlineConnectionStatus, this, &CContextNetwork::changedAtcStationOnlineConnectionStatus, Qt::QueuedConnection);
connect(m_airspace, &CAirspaceMonitor::changedAtcStationsOnline, this, &CContextNetwork::changedAtcStationsOnline, Qt::QueuedConnection);
connect(m_airspace, &CAirspaceMonitor::changedAtcStationsBooked, this, &CContextNetwork::changedAtcStationsBooked, Qt::QueuedConnection);
connect(m_airspace, &CAirspaceMonitor::changedAircraftInRange, this, &CContextNetwork::changedAircraftInRange, Qt::QueuedConnection);
connect(m_airspace, &CAirspaceMonitor::removedAircraft, this, &IContextNetwork::removedAircraft, Qt::QueuedConnection); // DBus
connect(m_airspace, &CAirspaceMonitor::readyForModelMatching, this, &CContextNetwork::onReadyForModelMatching); // intentionally NOT QueuedConnection
@@ -883,15 +882,6 @@ namespace BlackCore::Context
return stations;
}
CAtcStationList CContextNetwork::getAtcStationsBooked(bool recalculateDistance) const
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategories::contextSlot()).debug() << Q_FUNC_INFO; }
CAtcStationList stations = m_airspace->getAtcStationsBooked();
if (!recalculateDistance || !this->getIContextOwnAircraft()) { return stations; }
stations.calculcateAndUpdateRelativeDistanceAndBearing(this->getIContextOwnAircraft()->getOwnAircraftSituation());
return stations;
}
CSimulatedAircraftList CContextNetwork::getAircraftInRange() const
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategories::contextSlot()).debug() << Q_FUNC_INFO; }
@@ -1173,13 +1163,6 @@ namespace BlackCore::Context
return c;
}
void CContextNetwork::requestAtcBookingsUpdate() const
{
if (!canUseAirspaceMonitor()) { return; }
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategories::contextSlot()).debug() << Q_FUNC_INFO; }
m_airspace->requestAtcBookingsUpdate();
}
bool CContextNetwork::updateAircraftRendered(const CCallsign &callsign, bool rendered)
{
if (!canUseAirspaceMonitor()) { return false; }

View File

@@ -308,12 +308,6 @@ namespace BlackCore
BlackMisc::CSimpleCommandParser::registerCommand({ ".disable callsign", "disable/ignore callsign" });
}
//! \copydoc BlackCore::Context::IContextNetwork::requestAtcBookingsUpdate
virtual void requestAtcBookingsUpdate() const override;
//! \copydoc BlackCore::Context::IContextNetwork::getAtcStationsBooked
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsBooked(bool recalculateDistance) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getAtcStationsOnline
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const override;
@@ -425,7 +419,6 @@ namespace BlackCore
BlackMisc::Simulation::CSimulatorInfo m_lastConnectedSim; //!< last connected sim.
// Digest signals, only sending after some time
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 };

View File

@@ -43,15 +43,9 @@ namespace BlackCore::Context
bool s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"connectionStatusChanged", this, SIGNAL(connectionStatusChanged(BlackMisc::Network::CConnectionStatus, BlackMisc::Network::CConnectionStatus)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAtcStationsBooked", this, SIGNAL(changedAtcStationsBooked()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAtcStationsOnline", this, SIGNAL(changedAtcStationsOnline()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAtcStationsBookedDigest", this, SIGNAL(changedAtcStationsBookedDigest()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAtcStationsOnlineDigest", this, SIGNAL(changedAtcStationsOnlineDigest()));
Q_ASSERT(s);
@@ -95,11 +89,6 @@ namespace BlackCore::Context
this->relayBaseClassSignals(serviceName, connection, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName());
}
void CContextNetworkProxy::requestAtcBookingsUpdate() const
{
m_dBusInterface->callDBus(QLatin1String("requestAtcBookingsUpdate"));
}
CAtcStationList CContextNetworkProxy::getAtcStationsOnline(bool recalculateDistance) const
{
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getAtcStationsOnline"), recalculateDistance);
@@ -110,11 +99,6 @@ namespace BlackCore::Context
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getClosestAtcStationsOnline"), number);
}
CAtcStationList CContextNetworkProxy::getAtcStationsBooked(bool recalculateDistance) const
{
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getAtcStationsBooked"), recalculateDistance);
}
CSimulatedAircraftList CContextNetworkProxy::getAircraftInRange() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraftList>(QLatin1String("getAircraftInRange"));

View File

@@ -73,18 +73,12 @@ namespace BlackCore
//! \name Interface overrides
//! @{
//! \copydoc BlackCore::Context::IContextNetwork::requestAtcBookingsUpdate
virtual void requestAtcBookingsUpdate() const override;
//! \copydoc BlackCore::Context::IContextNetwork::getAtcStationsOnline
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getClosestAtcStationsOnline
virtual BlackMisc::Aviation::CAtcStationList getClosestAtcStationsOnline(int number) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getAtcStationsBooked
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsBooked(bool recalculateDistance) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getAircraftInRange
virtual BlackMisc::Simulation::CSimulatedAircraftList getAircraftInRange() const override;