mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Formatting
This commit is contained in:
committed by
Roland Winklmeier
parent
e97de13545
commit
b5ba4013dd
@@ -922,7 +922,8 @@ namespace BlackCore
|
||||
CAircraftSituation correctedSituation(situation);
|
||||
if (!correctedSituation.hasGroundElevation() && !correctedSituation.canLikelySkipNearGroundInterpolation())
|
||||
{
|
||||
const CElevationPlane ep = this->findClosestElevationWithinRangeOrRequest(correctedSituation, correctedSituation.getDistancePerTime(1000), callsign);
|
||||
const CLength distance(correctedSituation.getDistancePerTime(1000));
|
||||
const CElevationPlane ep = this->findClosestElevationWithinRangeOrRequest(correctedSituation, distance, callsign);
|
||||
correctedSituation.setGroundElevation(ep);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,18 +115,18 @@ namespace BlackCore
|
||||
//! Request updates of bookings
|
||||
void requestAtcBookingsUpdate();
|
||||
|
||||
//! Create dummy entries for performance tests
|
||||
void testCreateDummyOnlineAtcStations(int number);
|
||||
|
||||
//! Test injected aircraft parts
|
||||
void testAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftParts &parts, bool incremental);
|
||||
|
||||
//! Analyzer
|
||||
CAirspaceAnalyzer *analyzer() const { return m_analyzer; }
|
||||
|
||||
//! Gracefully shut down, e.g. for thread safety
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Create dummy entries for performance tests
|
||||
void testCreateDummyOnlineAtcStations(int number);
|
||||
|
||||
//! Test injected aircraft parts
|
||||
void testAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftParts &parts, bool incremental);
|
||||
|
||||
signals:
|
||||
//! Online ATC stations were changed
|
||||
void changedAtcStationsOnline();
|
||||
|
||||
@@ -54,12 +54,12 @@ namespace BlackSimPlugin
|
||||
Q_ASSERT_X(remoteAircraftProvider, Q_FUNC_INFO, "Missing provider");
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing global object");
|
||||
|
||||
m_addPendingAircraftTimer.setInterval(AddPendingAircraftIntervalMs);
|
||||
m_addPendingSimObjTimer.setInterval(AddPendingAircraftIntervalMs);
|
||||
m_useFsuipc = false;
|
||||
// default model will be set in derived class
|
||||
|
||||
CSimulatorFsxCommon::registerHelp();
|
||||
connect(&m_addPendingAircraftTimer, &QTimer::timeout, this, &CSimulatorFsxCommon::addPendingAircraftByTimer);
|
||||
connect(&m_addPendingSimObjTimer, &QTimer::timeout, this, &CSimulatorFsxCommon::addPendingAircraftByTimer);
|
||||
}
|
||||
|
||||
CSimulatorFsxCommon::~CSimulatorFsxCommon()
|
||||
@@ -382,7 +382,7 @@ namespace BlackSimPlugin
|
||||
void CSimulatorFsxCommon::updateOwnAircraftFromSimulator(const DataDefinitionOwnAircraft &simulatorOwnAircraft)
|
||||
{
|
||||
CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||
BlackMisc::Geo::CCoordinateGeodetic position;
|
||||
CCoordinateGeodetic position;
|
||||
position.setLatitude(CLatitude(simulatorOwnAircraft.latitude, CAngleUnit::deg()));
|
||||
position.setLongitude(CLongitude(simulatorOwnAircraft.longitude, CAngleUnit::deg()));
|
||||
|
||||
@@ -535,10 +535,11 @@ namespace BlackSimPlugin
|
||||
if (!simObject.hasValidRequestAndObjectId() || callsign.isEmpty()) { return false; }
|
||||
|
||||
// we know the object has been created. But it can happen it is directly removed afterwards
|
||||
QTimer::singleShot(500, this, [ = ]
|
||||
const CSimulatedAircraft verifyAircraft(simObject.getAircraft());
|
||||
QTimer::singleShot(1000, this, [ = ]
|
||||
{
|
||||
// also triggers new add if required
|
||||
this->verifyAddedRemoteAircraft(simObject.getAircraft());
|
||||
this->verifyAddedRemoteAircraft(verifyAircraft);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace BlackSimPlugin
|
||||
void updateRemoteAircraft();
|
||||
|
||||
//! Update remote aircraft parts (send to FSX)
|
||||
bool updateRemoteAircraftParts(const CSimConnectObject &simObj,
|
||||
bool updateRemoteAircraftParts(const CSimConnectObject &simObject,
|
||||
const BlackMisc::Aviation::CAircraftParts &parts, const BlackMisc::Simulation::CPartsStatus &partsStatus);
|
||||
|
||||
//! Send parts to simulator
|
||||
@@ -379,7 +379,7 @@ namespace BlackSimPlugin
|
||||
SIMCONNECT_DATA_REQUEST_ID m_requestIdSimData = static_cast<SIMCONNECT_DATA_REQUEST_ID>(RequestIdSimDataStart); //!< request id, use obtainRequestIdForSimData() to get id
|
||||
SIMCONNECT_DATA_REQUEST_ID m_requestIdProbe = static_cast<SIMCONNECT_DATA_REQUEST_ID>(RequestIdTerrainProbeStart); //!< request id, use obtainRequestIdForProbe() to get id
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_addPendingAircraft; //!< aircraft awaiting to be added
|
||||
QTimer m_addPendingAircraftTimer; //!< updating of aircraft awaiting to be added
|
||||
QTimer m_addPendingSimObjTimer; //!< updating of sim objects awaiting to be added
|
||||
};
|
||||
|
||||
//! Listener for FSX
|
||||
|
||||
Reference in New Issue
Block a user