mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
[XP] Minor fixes/style XPlane driver
This commit is contained in:
committed by
Mat Sutcliffe
parent
4d7468f913
commit
ea4a8f2462
@@ -399,11 +399,15 @@ namespace BlackSimPlugin
|
||||
engines.push_back(engine);
|
||||
}
|
||||
|
||||
const CAircraftParts parts { {
|
||||
m_xplaneData.strobeLightsOn, m_xplaneData.landingLightsOn, m_xplaneData.taxiLightsOn,
|
||||
m_xplaneData.beaconLightsOn, m_xplaneData.navLightsOn, false
|
||||
},
|
||||
m_xplaneData.gearReployRatio > 0, static_cast<int>(m_xplaneData.flapsReployRatio * 100),
|
||||
const CAircraftLights lights(
|
||||
m_xplaneData.strobeLightsOn, m_xplaneData.landingLightsOn, m_xplaneData.taxiLightsOn,
|
||||
m_xplaneData.beaconLightsOn, m_xplaneData.navLightsOn, false
|
||||
);
|
||||
|
||||
const CAircraftParts parts
|
||||
{
|
||||
lights,
|
||||
m_xplaneData.gearDeployRatio > 0, qRound(m_xplaneData.flapsDeployRatio * 100.0),
|
||||
m_xplaneData.speedBrakeRatio > 0.5, engines, m_xplaneData.onGroundAll
|
||||
};
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ namespace BlackSimPlugin
|
||||
bool navLightsOn; //!< NAV lights on?
|
||||
bool strobeLightsOn; //!< Strobe lights on?
|
||||
bool taxiLightsOn; //!< Taxi lights on?
|
||||
double flapsReployRatio; //!< Flaps deployment ratio [%]
|
||||
double gearReployRatio; //!< Gear deployment ratio [%]
|
||||
double flapsDeployRatio; //!< Flaps deployment ratio [%]
|
||||
double gearDeployRatio; //!< Gear deployment ratio [%]
|
||||
QList<double> enginesN1Percentage; //!< N1 per engine [%]
|
||||
double speedBrakeRatio; //!< Speed break ratio [%]
|
||||
double seaLevelPressureInHg; //!< Sea level pressure [inhg]
|
||||
|
||||
@@ -169,8 +169,8 @@ namespace BlackSimPlugin
|
||||
QDBusPendingReply<double, double, double, QList<double> > reply = *watcher;
|
||||
if (!reply.isError())
|
||||
{
|
||||
o_xplaneData->flapsReployRatio = reply.argumentAt<0>();
|
||||
o_xplaneData->gearReployRatio = reply.argumentAt<1>();
|
||||
o_xplaneData->flapsDeployRatio = reply.argumentAt<0>();
|
||||
o_xplaneData->gearDeployRatio = reply.argumentAt<1>();
|
||||
o_xplaneData->speedBrakeRatio = reply.argumentAt<2>();
|
||||
o_xplaneData->enginesN1Percentage = reply.argumentAt<3>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user