mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Formatting
This commit is contained in:
@@ -209,6 +209,6 @@ namespace BlackCore
|
||||
if (!wasValid) { return; } // ignore the 1st snapshot
|
||||
}
|
||||
|
||||
emit airspaceAircraftSnapshot(snapshot);
|
||||
emit this->airspaceAircraftSnapshot(snapshot);
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -118,9 +118,9 @@ namespace BlackCore
|
||||
// watchdog
|
||||
CCallsignTimestampSet m_aircraftCallsignTimestamps; //!< for watchdog (pilots)
|
||||
CCallsignTimestampSet m_atcCallsignTimestamps; //!< for watchdog (ATC)
|
||||
BlackMisc::PhysicalQuantities::CTime m_timeoutAircraft = {15, BlackMisc::PhysicalQuantities::CTimeUnit::s() }; //!< Timeout value for watchdog functionality
|
||||
BlackMisc::PhysicalQuantities::CTime m_timeoutAtc = {50, BlackMisc::PhysicalQuantities::CTimeUnit::s() }; //!< Timeout value for watchdog functionality
|
||||
qint64 m_lastWatchdogCallMsSinceEpoch;
|
||||
BlackMisc::PhysicalQuantities::CTime m_timeoutAircraft = { 15, BlackMisc::PhysicalQuantities::CTimeUnit::s() }; //!< Timeout value for watchdog functionality
|
||||
BlackMisc::PhysicalQuantities::CTime m_timeoutAtc = { 50, BlackMisc::PhysicalQuantities::CTimeUnit::s() }; //!< Timeout value for watchdog functionality
|
||||
qint64 m_lastWatchdogCallMsSinceEpoch; //!< when last called
|
||||
|
||||
// snapshot
|
||||
BlackMisc::Simulation::CAirspaceAircraftSnapshot m_latestAircraftSnapshot;
|
||||
@@ -128,8 +128,8 @@ namespace BlackCore
|
||||
bool m_simulatorRenderingEnabled = true;
|
||||
int m_simulatorMaxRenderedAircraft = -1;
|
||||
BlackMisc::PhysicalQuantities::CLength m_simulatorMaxRenderedDistance { 0.0, nullptr };
|
||||
mutable QReadWriteLock m_lockSnapshot; //!< lock snapshot
|
||||
mutable QReadWriteLock m_lockRestrictions; //!< lock simulator restrictions
|
||||
mutable QReadWriteLock m_lockSnapshot; //!< lock snapshot
|
||||
mutable QReadWriteLock m_lockRestrictions; //!< lock simulator restrictions
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -201,9 +201,10 @@ namespace BlackCore
|
||||
//! Angle calculation
|
||||
BlackMisc::PhysicalQuantities::CAngle calculateBearingToOwnAircraft(const BlackMisc::Aviation::CAircraftSituation &situation) const;
|
||||
|
||||
//! Store an aircraft situation
|
||||
//! Store an aircraft situation under consideration of gnd.flags/CG and elevation
|
||||
//! \threadsafe
|
||||
//! \remark sets gnd flag from parts if parts are available
|
||||
//! \remark uses gnd elevation if found
|
||||
void storeAircraftSituation(const BlackMisc::Aviation::CAircraftSituation &situation);
|
||||
|
||||
//! Add or update aircraft
|
||||
@@ -220,7 +221,7 @@ namespace BlackCore
|
||||
//! Update booked station by callsign
|
||||
int updateBookedStation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CPropertyIndexVariantMap &vm, bool skipEqualValues = true, bool sendSignal = true);
|
||||
|
||||
//! Call ps_customFSInnPacketReceived with stored packet
|
||||
//! Call CAirspaceMonitor::onCustomFSInnPacketReceived with stored packet
|
||||
void recallFsInnPacket(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Send the information if aircraft and(!) client are available
|
||||
|
||||
@@ -48,6 +48,6 @@ namespace BlackGui
|
||||
private:
|
||||
AircraftMode m_mode = NotSet;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
#endif // guard
|
||||
|
||||
@@ -51,10 +51,10 @@ namespace BlackMisc
|
||||
{
|
||||
public:
|
||||
//! Contains callsign?
|
||||
bool containsCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
bool containsCallsign(const CCallsign &callsign) const;
|
||||
|
||||
//! Apply for given callsign
|
||||
int applyIfCallsign(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CPropertyIndexVariantMap &variantMap, bool skipEqualValues = true);
|
||||
int applyIfCallsign(const CCallsign &callsign, const CPropertyIndexVariantMap &variantMap, bool skipEqualValues = true);
|
||||
|
||||
//! All callsigns
|
||||
BlackMisc::Aviation::CCallsignSet getCallsigns() const;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Simulation
|
||||
{
|
||||
//! Direct in memory access to client (network client) data
|
||||
//! Direct in memory access to interpolation setup, normally implemented by simulator
|
||||
class BLACKMISC_EXPORT IInterpolationSetupProvider : public IProvider
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -343,6 +343,7 @@ namespace BlackMisc
|
||||
m_situationsByCallsign[callsign] = situations;
|
||||
}
|
||||
|
||||
// aircraft updates
|
||||
QWriteLocker l(&m_lockAircraft);
|
||||
const int c = m_aircraftInRange.setGroundElevationChecked(callsign, elevation);
|
||||
return c > 0;
|
||||
|
||||
@@ -119,11 +119,11 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
virtual Aviation::CCallsignSet remoteAircraftSupportingParts() const = 0;
|
||||
|
||||
//! Enable/disable rendering
|
||||
//! Enable/disable enabled aircraft
|
||||
//! \threadsafe
|
||||
virtual bool updateAircraftEnabled(const Aviation::CCallsign &callsign, bool enabledForRendering) = 0;
|
||||
|
||||
//! Rendered?
|
||||
//! Aircraft rendered?
|
||||
//! \threadsafe
|
||||
virtual bool updateAircraftRendered(const Aviation::CCallsign &callsign, bool rendered) = 0;
|
||||
|
||||
@@ -358,8 +358,8 @@ namespace BlackMisc
|
||||
CSituationsPerCallsign m_situationsByCallsign; //!< situations, for performance reasons per callsign, thread safe access required
|
||||
CPartsPerCallsign m_partsByCallsign; //!< parts, for performance reasons per callsign, thread safe access required
|
||||
Aviation::CCallsignSet m_aircraftWithParts; //!< aircraft supporting parts, thread safe access required
|
||||
int m_situationsAdded = 0; //!< total number of situations added
|
||||
int m_partsAdded = 0; //!< total number of parts added
|
||||
int m_situationsAdded = 0; //!< total number of situations added, thread safe access required
|
||||
int m_partsAdded = 0; //!< total number of parts added, thread safe access required
|
||||
|
||||
CSimulatedAircraftList m_aircraftInRange; //!< aircraft, thread safe access required
|
||||
QMap<Aviation::CCallsign, CStatusMessageList> m_reverseLookupMessages;
|
||||
|
||||
@@ -63,11 +63,10 @@ namespace BlackSimPlugin
|
||||
//! Client status changed
|
||||
void statusChanged(const BlackMisc::Aviation::CCallsign &callsign, BlackSimPlugin::Fs9::CFs9Client::ClientStatus);
|
||||
|
||||
protected slots:
|
||||
//! Timer event slot
|
||||
protected:
|
||||
//! \copydoc QObject::timerEvent
|
||||
virtual void timerEvent(QTimerEvent *event) override;
|
||||
|
||||
protected:
|
||||
//! \copydoc BlackMisc::CContinuousWorker::initialize
|
||||
virtual void initialize() override;
|
||||
|
||||
@@ -87,10 +86,14 @@ namespace BlackSimPlugin
|
||||
//! Close the connection
|
||||
HRESULT closeConnection();
|
||||
|
||||
//! Send functions
|
||||
//! @{
|
||||
void sendMultiplayerPosition(const BlackMisc::Aviation::CAircraftSituation &situation);
|
||||
void sendMultiplayerParamaters();
|
||||
void sendMultiplayerChangePlayerPlane();
|
||||
//! @}
|
||||
|
||||
//! Simulator interface
|
||||
const BlackCore::ISimulator *simulator() const;
|
||||
|
||||
BlackMisc::PhysicalQuantities::CTime m_updateInterval;
|
||||
|
||||
Reference in New Issue
Block a user