mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +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);
|
||||||
|
|
||||||
@@ -170,9 +171,9 @@ namespace BlackCore
|
|||||||
//! \copydoc BlackMisc::Simulation::IRemoteAircraftProvider::connectRemoteAircraftProviderSignals
|
//! \copydoc BlackMisc::Simulation::IRemoteAircraftProvider::connectRemoteAircraftProviderSignals
|
||||||
virtual QList<QMetaObject::Connection> connectRemoteAircraftProviderSignals(
|
virtual QList<QMetaObject::Connection> connectRemoteAircraftProviderSignals(
|
||||||
QObject *receiver,
|
QObject *receiver,
|
||||||
std::function<void(const BlackMisc::Aviation::CAircraftSituation &)> addedSituationSlot,
|
std::function<void(const BlackMisc::Aviation::CAircraftSituation &)> addedSituationSlot,
|
||||||
std::function<void(const BlackMisc::Aviation::CCallsign &, const BlackMisc::Aviation::CAircraftParts &)> addedPartsSlot,
|
std::function<void(const BlackMisc::Aviation::CCallsign &, const BlackMisc::Aviation::CAircraftParts &)> addedPartsSlot,
|
||||||
std::function<void(const BlackMisc::Aviation::CCallsign &)> removedAircraftSlot,
|
std::function<void(const BlackMisc::Aviation::CCallsign &)> removedAircraftSlot,
|
||||||
std::function<void(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot
|
std::function<void(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot
|
||||||
) override;
|
) override;
|
||||||
|
|
||||||
@@ -232,10 +233,10 @@ namespace BlackCore
|
|||||||
QString modelString;
|
QString modelString;
|
||||||
};
|
};
|
||||||
|
|
||||||
BlackMisc::Aviation::CAtcStationList m_atcStationsOnline; //!< online ATC stations
|
BlackMisc::Aviation::CAtcStationList m_atcStationsOnline; //!< online ATC stations
|
||||||
BlackMisc::Aviation::CAtcStationList m_atcStationsBooked; //!< booked ATC stations
|
BlackMisc::Aviation::CAtcStationList m_atcStationsBooked; //!< booked ATC stations
|
||||||
BlackMisc::Network::CClientList m_otherClients; //!< client informatiom, thread safe access required
|
BlackMisc::Network::CClientList m_otherClients; //!< client informatiom, thread safe access required
|
||||||
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftInRange; //!< aircraft, thread safe access required
|
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftInRange; //!< aircraft, thread safe access required
|
||||||
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_reverseLookupMessages;
|
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_reverseLookupMessages;
|
||||||
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_aircraftPartsHistory;
|
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_aircraftPartsHistory;
|
||||||
QMap<BlackMisc::Aviation::CCallsign, FsInnPacket> m_tempFsInnPackets;
|
QMap<BlackMisc::Aviation::CCallsign, FsInnPacket> m_tempFsInnPackets;
|
||||||
@@ -247,11 +248,11 @@ namespace BlackCore
|
|||||||
|
|
||||||
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> m_flightPlanCache; //!< flight plan information retrieved any cached
|
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> m_flightPlanCache; //!< flight plan information retrieved any cached
|
||||||
|
|
||||||
INetwork *m_network = nullptr; //!< corresponding network interface
|
INetwork *m_network = nullptr; //!< corresponding network interface
|
||||||
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
|
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
|
||||||
bool m_enableReverseLookupMsgs = false; //!< shall we log. information about the matching process
|
bool m_enableReverseLookupMsgs = false; //!< shall we log. information about the matching process
|
||||||
bool m_enableAircraftPartsHistory = true; //!< shall we keep a history of aircraft parts
|
bool m_enableAircraftPartsHistory = true; //!< shall we keep a history of aircraft parts
|
||||||
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
|
||||||
|
|
||||||
// locks
|
// locks
|
||||||
mutable QReadWriteLock m_lockSituations; //!< lock for situations: m_situationsByCallsign
|
mutable QReadWriteLock m_lockSituations; //!< lock for situations: m_situationsByCallsign
|
||||||
|
|||||||
@@ -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,24 +199,26 @@ 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
|
||||||
|
|
||||||
bool m_isWeatherActivated = false; //!< Is simulator weather activated?
|
bool m_isWeatherActivated = false; //!< Is simulator weather activated?
|
||||||
BlackMisc::Geo::CCoordinateGeodetic m_lastWeatherPosition; //!< Own aircraft position at which weather was fetched and injected last
|
BlackMisc::Geo::CCoordinateGeodetic m_lastWeatherPosition; //!< Own aircraft position at which weather was fetched and injected last
|
||||||
BlackMisc::CSetting<BlackMisc::Simulation::TSelectedWeatherScenario> m_weatherScenarioSettings { this, &CSimulatorCommon::reloadWeatherSettings }; //!< Selected weather scenario
|
BlackMisc::CSetting<BlackMisc::Simulation::TSelectedWeatherScenario> m_weatherScenarioSettings { this, &CSimulatorCommon::reloadWeatherSettings }; //!< Selected weather scenario
|
||||||
|
|
||||||
//! Lookup against DB data
|
//! Lookup against DB data
|
||||||
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
|
||||||
BlackMisc::Simulation::CSimulatorPluginInfo m_simulatorPluginInfo; //!< info object
|
BlackMisc::Simulation::CSimulatorPluginInfo m_simulatorPluginInfo; //!< info object
|
||||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||||
|
|||||||
@@ -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