refs #268 slots in XBus::CService to detect whether the aircraft is on the ground

This commit is contained in:
Mathew Sutcliffe
2014-06-15 19:28:31 +01:00
parent 19927ab9d4
commit f430b65d39
3 changed files with 24 additions and 0 deletions

View File

@@ -122,6 +122,16 @@ namespace BlackSimPlugin
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueHeading"));
}
bool CXBusServiceProxy::getAnyWheelOnGround() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getAnyWheelOnGround"));
}
bool CXBusServiceProxy::getAllWheelsOnGround() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getAllWheelsOnGround"));
}
int CXBusServiceProxy::getCom1Active() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1Active"));

View File

@@ -112,6 +112,12 @@ namespace BlackSimPlugin
//! \copydoc XBus::CService::getTrueHeading
double getTrueHeading() const;
//! Get whether any wheel is on the ground
bool getAnyWheelOnGround() const;
//! Get whether all wheels are on the ground
bool getAllWheelsOnGround() const;
//! \copydoc XBus::CService::getCom1Active
int getCom1Active() const;

View File

@@ -107,6 +107,12 @@ namespace XBus
//! Get aircraft true heading in degrees
double getTrueHeading() const { return m_heading.get(); }
//! Get whether any wheel is on the ground
bool getAnyWheelOnGround() const { return m_onGroundAny.get(); }
//! Get whether all wheels are on the ground
bool getAllWheelsOnGround() const { return m_onGroundAll.get(); }
//! Get the current COM1 active frequency in kHz
int getCom1Active() const { return m_com1Active.get() * 10; }
@@ -159,6 +165,8 @@ namespace XBus
DataRef<xplane::data::sim::flightmodel::position::theta> m_pitch;
DataRef<xplane::data::sim::flightmodel::position::phi> m_roll;
DataRef<xplane::data::sim::flightmodel::position::psi> m_heading;
DataRef<xplane::data::sim::flightmodel::failures::onground_any> m_onGroundAny;
DataRef<xplane::data::sim::flightmodel::failures::onground_all> m_onGroundAll;
DataRef<xplane::data::sim::cockpit::radios::com1_freq_hz> m_com1Active;
DataRef<xplane::data::sim::cockpit::radios::com1_stdby_freq_hz> m_com1Standby;
DataRef<xplane::data::sim::cockpit::radios::com2_freq_hz> m_com2Active;