mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +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);
|
engines.push_back(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CAircraftParts parts { {
|
const CAircraftLights lights(
|
||||||
m_xplaneData.strobeLightsOn, m_xplaneData.landingLightsOn, m_xplaneData.taxiLightsOn,
|
m_xplaneData.strobeLightsOn, m_xplaneData.landingLightsOn, m_xplaneData.taxiLightsOn,
|
||||||
m_xplaneData.beaconLightsOn, m_xplaneData.navLightsOn, false
|
m_xplaneData.beaconLightsOn, m_xplaneData.navLightsOn, false
|
||||||
},
|
);
|
||||||
m_xplaneData.gearReployRatio > 0, static_cast<int>(m_xplaneData.flapsReployRatio * 100),
|
|
||||||
|
const CAircraftParts parts
|
||||||
|
{
|
||||||
|
lights,
|
||||||
|
m_xplaneData.gearDeployRatio > 0, qRound(m_xplaneData.flapsDeployRatio * 100.0),
|
||||||
m_xplaneData.speedBrakeRatio > 0.5, engines, m_xplaneData.onGroundAll
|
m_xplaneData.speedBrakeRatio > 0.5, engines, m_xplaneData.onGroundAll
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ namespace BlackSimPlugin
|
|||||||
bool navLightsOn; //!< NAV lights on?
|
bool navLightsOn; //!< NAV lights on?
|
||||||
bool strobeLightsOn; //!< Strobe lights on?
|
bool strobeLightsOn; //!< Strobe lights on?
|
||||||
bool taxiLightsOn; //!< Taxi lights on?
|
bool taxiLightsOn; //!< Taxi lights on?
|
||||||
double flapsReployRatio; //!< Flaps deployment ratio [%]
|
double flapsDeployRatio; //!< Flaps deployment ratio [%]
|
||||||
double gearReployRatio; //!< Gear deployment ratio [%]
|
double gearDeployRatio; //!< Gear deployment ratio [%]
|
||||||
QList<double> enginesN1Percentage; //!< N1 per engine [%]
|
QList<double> enginesN1Percentage; //!< N1 per engine [%]
|
||||||
double speedBrakeRatio; //!< Speed break ratio [%]
|
double speedBrakeRatio; //!< Speed break ratio [%]
|
||||||
double seaLevelPressureInHg; //!< Sea level pressure [inhg]
|
double seaLevelPressureInHg; //!< Sea level pressure [inhg]
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ namespace BlackSimPlugin
|
|||||||
QDBusPendingReply<double, double, double, QList<double> > reply = *watcher;
|
QDBusPendingReply<double, double, double, QList<double> > reply = *watcher;
|
||||||
if (!reply.isError())
|
if (!reply.isError())
|
||||||
{
|
{
|
||||||
o_xplaneData->flapsReployRatio = reply.argumentAt<0>();
|
o_xplaneData->flapsDeployRatio = reply.argumentAt<0>();
|
||||||
o_xplaneData->gearReployRatio = reply.argumentAt<1>();
|
o_xplaneData->gearDeployRatio = reply.argumentAt<1>();
|
||||||
o_xplaneData->speedBrakeRatio = reply.argumentAt<2>();
|
o_xplaneData->speedBrakeRatio = reply.argumentAt<2>();
|
||||||
o_xplaneData->enginesN1Percentage = reply.argumentAt<3>();
|
o_xplaneData->enginesN1Percentage = reply.argumentAt<3>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user