mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Ref T322, style/renamings
This commit is contained in:
committed by
Roland Winklmeier
parent
f3f2fa664e
commit
be6ae734a0
@@ -122,7 +122,7 @@ namespace BlackCore
|
||||
const QPointer<CAirspaceMonitor> myself(this);
|
||||
QTimer::singleShot(0, m_network, [ = ]
|
||||
{
|
||||
if (myself.isNull()) { return; }
|
||||
if (!myself) { return; }
|
||||
if (m_network) { m_network->addInterimPositionReceiver(callsign); }
|
||||
});
|
||||
}
|
||||
@@ -159,7 +159,7 @@ namespace BlackCore
|
||||
{
|
||||
// process some other events and hope network answer is received already
|
||||
// CEventLoop::processEventsUntil cannot be used, as a received flight plan might be for another callsign
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
sApp->processEventsFor(100);
|
||||
if (!sApp || sApp->isShuttingDown()) { return CFlightPlan(); }
|
||||
if (m_flightPlanCache.contains(callsign))
|
||||
{
|
||||
@@ -258,7 +258,7 @@ namespace BlackCore
|
||||
return users;
|
||||
}
|
||||
|
||||
CAtcStation CAirspaceMonitor::getAtcStationForComUnit(const CComSystem &comSystem)
|
||||
CAtcStation CAirspaceMonitor::getAtcStationForComUnit(const CComSystem &comSystem) const
|
||||
{
|
||||
CAtcStation station;
|
||||
CAtcStationList stations = m_atcStationsOnline.findIfComUnitTunedIn25KHz(comSystem);
|
||||
@@ -303,7 +303,7 @@ namespace BlackCore
|
||||
m_bookingsRequested = true;
|
||||
}
|
||||
|
||||
bool CAirspaceMonitor::enableWatchdog(bool enable)
|
||||
bool CAirspaceMonitor::enableAnalyzer(bool enable)
|
||||
{
|
||||
if (!this->analyzer()) { return false; }
|
||||
this->analyzer()->setEnabled(enable);
|
||||
@@ -488,7 +488,7 @@ namespace BlackCore
|
||||
const QPointer<CAirspaceMonitor> myself(this);
|
||||
QTimer::singleShot(1500, this, [ = ]()
|
||||
{
|
||||
if (myself.isNull() || !sApp || sApp->isShuttingDown()) { return; }
|
||||
if (!myself || !sApp || sApp->isShuttingDown()) { return; }
|
||||
if (!this->isAircraftInRange(callsign))
|
||||
{
|
||||
const CStatusMessage m = CMatchingUtils::logMessage(callsign, "No longer in range", CAirspaceMonitor::getLogCategories());
|
||||
@@ -516,7 +516,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::onAtcPositionUpdate(const CCallsign &callsign, const BlackMisc::PhysicalQuantities::CFrequency &frequency, const CCoordinateGeodetic &position, const BlackMisc::PhysicalQuantities::CLength &range)
|
||||
void CAirspaceMonitor::onAtcPositionUpdate(const CCallsign &callsign, const CFrequency &frequency, const CCoordinateGeodetic &position, const BlackMisc::PhysicalQuantities::CLength &range)
|
||||
{
|
||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "wrong thread");
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Need sApp");
|
||||
@@ -989,7 +989,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
const CLength distance(correctedSituation.getDistancePerTime250ms(CElevationPlane::singlePointRadius())); // distnacee per ms
|
||||
const CLength distance(correctedSituation.getDistancePerTime250ms(CElevationPlane::singlePointRadius())); // distance per ms
|
||||
const CElevationPlane ep = this->findClosestElevationWithinRangeOrRequest(correctedSituation, distance, callsign);
|
||||
haveRequestedElevation = ep.isNull(); // NULL means we requested
|
||||
Q_ASSERT_X(ep.isNull() || !ep.getRadius().isNull(), Q_FUNC_INFO, "null radius");
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace BlackCore
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const { return m_atcStationsBooked; }
|
||||
|
||||
//! Returns the closest ATC station operating on the given frequency, if any
|
||||
BlackMisc::Aviation::CAtcStation getAtcStationForComUnit(const BlackMisc::Aviation::CComSystem &comSystem);
|
||||
BlackMisc::Aviation::CAtcStation getAtcStationForComUnit(const BlackMisc::Aviation::CComSystem &comSystem) const;
|
||||
|
||||
//! Clear the contents
|
||||
void clear();
|
||||
@@ -119,7 +119,7 @@ namespace BlackCore
|
||||
CAirspaceAnalyzer *analyzer() const { return m_analyzer; }
|
||||
|
||||
//! \copydoc CAirspaceAnalyzer::setEnabled
|
||||
bool enableWatchdog(bool enable);
|
||||
bool enableAnalyzer(bool enable);
|
||||
|
||||
//! Gracefully shut down, e.g. for thread safety
|
||||
void gracefulShutdown();
|
||||
|
||||
Reference in New Issue
Block a user