mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 11:25:33 +08:00
Formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
7ec85d8716
commit
39bd8aa2bb
@@ -116,7 +116,8 @@ namespace BlackCore
|
|||||||
//! Returns a list of the users corresponding to the given callsigns
|
//! Returns a list of the users corresponding to the given callsigns
|
||||||
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const;
|
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const;
|
||||||
|
|
||||||
//! Returns the flightplan for the given callsign
|
//! Returns the loaded flight plan for the given callsign
|
||||||
|
//! \remarks only use this if a network loaded flight plan is directly needed
|
||||||
//! \remarks pseudo synchronous, call the async functions and waits for result
|
//! \remarks pseudo synchronous, call the async functions and waits for result
|
||||||
BlackMisc::Aviation::CFlightPlan loadFlightPlanFromNetwork(const BlackMisc::Aviation::CCallsign &callsign);
|
BlackMisc::Aviation::CFlightPlan loadFlightPlanFromNetwork(const BlackMisc::Aviation::CCallsign &callsign);
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// info
|
// info
|
||||||
CLogMessage(this).info("Initialized simulator driver %1") << m_simulatorPluginInfo.toQString();
|
CLogMessage(this).info("Initialized simulator driver: '%1'") << m_simulatorPluginInfo.toQString();
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimulatorCommon::~CSimulatorCommon() { }
|
CSimulatorCommon::~CSimulatorCommon() { }
|
||||||
@@ -94,12 +94,15 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
Q_ASSERT_X(remoteAircraft.hasModelString(), Q_FUNC_INFO, "Missing model string");
|
Q_ASSERT_X(remoteAircraft.hasModelString(), Q_FUNC_INFO, "Missing model string");
|
||||||
Q_ASSERT_X(remoteAircraft.hasCallsign(), Q_FUNC_INFO, "Missing callsign");
|
Q_ASSERT_X(remoteAircraft.hasCallsign(), Q_FUNC_INFO, "Missing callsign");
|
||||||
|
|
||||||
|
const bool renderingRestricted = m_interpolationRenderingSetup.isRenderingRestricted();
|
||||||
|
if (this->showDebugLogMessage()) { this->debugLogMessage(Q_FUNC_INFO, QString("Restricted: %1 cs: '%2' enabled: %3").arg(boolToYesNo(renderingRestricted), remoteAircraft.getCallsignAsString(), boolToYesNo(remoteAircraft.isEnabled()))); }
|
||||||
if (!remoteAircraft.isEnabled()) { return false; }
|
if (!remoteAircraft.isEnabled()) { return false; }
|
||||||
|
|
||||||
// if not restriced, directly change
|
// if not restriced, directly change
|
||||||
if (!m_interpolationRenderingSetup.isRenderingRestricted()) { this->physicallyAddRemoteAircraft(remoteAircraft); return true; }
|
if (!renderingRestricted) { this->physicallyAddRemoteAircraft(remoteAircraft); return true; }
|
||||||
|
|
||||||
// will be added with next snapshot ps_recalculateRenderedAircraft
|
// restricted -> will be added with next snapshot ps_recalculateRenderedAircraft
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,9 +199,11 @@ namespace BlackCore
|
|||||||
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time
|
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time
|
||||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||||
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log interpolation
|
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log interpolation
|
||||||
BlackMisc::Simulation::CInterpolationAndRenderingSetup m_interpolationRenderingSetup; //!< logging, rendering etc.
|
|
||||||
mutable QReadWriteLock m_interpolationRenderingSetupMutex; //!< mutex protecting setup object
|
mutable QReadWriteLock m_interpolationRenderingSetupMutex; //!< mutex protecting setup object
|
||||||
|
|
||||||
|
// setup for debugging, logs ..
|
||||||
|
BlackMisc::Simulation::CInterpolationAndRenderingSetup m_interpolationRenderingSetup; //!< logging, rendering etc.
|
||||||
|
|
||||||
// some optional functionality which can be used by the sims as needed
|
// some optional functionality which can be used by the sims as needed
|
||||||
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftToAddAgainWhenRemoved; //!< add this model again when removed, normally used to change model
|
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftToAddAgainWhenRemoved; //!< add this model again when removed, normally used to change model
|
||||||
QHash<BlackMisc::Aviation::CCallsign, BlackMisc::Simulation::CInterpolationHints> m_hints; //!< last ground elevation fetched
|
QHash<BlackMisc::Aviation::CCallsign, BlackMisc::Simulation::CInterpolationHints> m_hints; //!< last ground elevation fetched
|
||||||
@@ -214,7 +216,7 @@ namespace BlackCore
|
|||||||
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_blinkCycle = false; //!< use for highlighting
|
bool m_blinkCycle = false; //!< used for highlighting
|
||||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||||
QTimer m_oneSecondTimer {this}; //!< multi purpose timer
|
QTimer m_oneSecondTimer {this}; //!< multi purpose timer
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
namespace BlackMisc { namespace Simulation { class CSimulatedAircraft; } }
|
namespace BlackMisc { namespace Simulation { class CSimulatedAircraft; } }
|
||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
{
|
{
|
||||||
namespace Vatsim
|
namespace Vatsim
|
||||||
|
|||||||
Reference in New Issue
Block a user