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