mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Formatting
This commit is contained in:
committed by
Roland Winklmeier
parent
e97de13545
commit
b5ba4013dd
@@ -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