mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
[XPlane] Avoid elevation requests and minor style fixes in XPlane driver
This commit is contained in:
committed by
Mat Sutcliffe
parent
651e6bdacf
commit
4d75c1576e
@@ -193,6 +193,10 @@ namespace BlackSimPlugin
|
||||
if (this->isShuttingDownOrDisconnected()) { return false; }
|
||||
if (reference.isNull()) { return false; }
|
||||
|
||||
// avoid requests for NON exising aircraft (based on LINUX crashes)
|
||||
if (callsign.isEmpty()) { return false; }
|
||||
if (!this->isAircraftInRange(callsign)) { return false; }
|
||||
|
||||
CCoordinateGeodetic pos(reference);
|
||||
if (!pos.hasMSLGeodeticHeight())
|
||||
{
|
||||
@@ -304,7 +308,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
m_lastWeatherPosition = currentPosition;
|
||||
const auto weatherGrid = CWeatherGrid { { "GLOB", currentPosition } };
|
||||
requestWeatherGrid(weatherGrid, { this, &CSimulatorXPlane::injectWeatherGrid });
|
||||
this->requestWeatherGrid(weatherGrid, { this, &CSimulatorXPlane::injectWeatherGrid });
|
||||
}
|
||||
}
|
||||
} // weather
|
||||
@@ -327,7 +331,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
// Engine number start counting at 1
|
||||
// We consider the engine running when N1 is bigger than 5 %
|
||||
CAircraftEngine engine {engineNumber + 1, m_xplaneData.enginesN1Percentage.at(engineNumber) > 5.0};
|
||||
const CAircraftEngine engine {engineNumber + 1, m_xplaneData.enginesN1Percentage.at(engineNumber) > 5.0};
|
||||
engines.push_back(engine);
|
||||
}
|
||||
|
||||
|
||||
@@ -251,10 +251,11 @@ namespace BlackSimPlugin
|
||||
unsigned int m_slowTimerCalls = 0; //!< how often called
|
||||
|
||||
BlackMisc::Aviation::CAirportList m_airportsInRange; //!< aiports in range of own aircraft
|
||||
CXPlaneMPAircraftObjects m_xplaneAircraftObjects; //!< XPlane multiplayer aircraft
|
||||
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_pendingToBeAddedAircraft; //!< aircraft to be added
|
||||
QHash<BlackMisc::Aviation::CCallsign, qint64> m_addingInProgressAircraft; //!< aircraft just adding
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftAddedFailed; //! aircraft for which adding failed
|
||||
CXPlaneMPAircraftObjects m_xplaneAircraftObjects; //!< XPlane multiplayer aircraft
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftAddedFailed; //!< aircraft for which adding failed
|
||||
XPlaneData m_xplaneData; //!< XPlane data
|
||||
|
||||
// statistics
|
||||
|
||||
Reference in New Issue
Block a user