From f430b65d39e468f7bf99ab8a9d8fb79123f422be Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sun, 15 Jun 2014 19:28:31 +0100 Subject: [PATCH] refs #268 slots in XBus::CService to detect whether the aircraft is on the ground --- src/plugins/simulator/xplane/xbus_service_proxy.cpp | 10 ++++++++++ src/plugins/simulator/xplane/xbus_service_proxy.h | 6 ++++++ src/xbus/service.h | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/src/plugins/simulator/xplane/xbus_service_proxy.cpp b/src/plugins/simulator/xplane/xbus_service_proxy.cpp index 108d5cd3a..990599afa 100644 --- a/src/plugins/simulator/xplane/xbus_service_proxy.cpp +++ b/src/plugins/simulator/xplane/xbus_service_proxy.cpp @@ -122,6 +122,16 @@ namespace BlackSimPlugin return m_dbusInterface->callDBusRet(QLatin1String("getTrueHeading")); } + bool CXBusServiceProxy::getAnyWheelOnGround() const + { + return m_dbusInterface->callDBusRet(QLatin1String("getAnyWheelOnGround")); + } + + bool CXBusServiceProxy::getAllWheelsOnGround() const + { + return m_dbusInterface->callDBusRet(QLatin1String("getAllWheelsOnGround")); + } + int CXBusServiceProxy::getCom1Active() const { return m_dbusInterface->callDBusRet(QLatin1String("getCom1Active")); diff --git a/src/plugins/simulator/xplane/xbus_service_proxy.h b/src/plugins/simulator/xplane/xbus_service_proxy.h index c7b54f0f4..1f74d8f73 100644 --- a/src/plugins/simulator/xplane/xbus_service_proxy.h +++ b/src/plugins/simulator/xplane/xbus_service_proxy.h @@ -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; diff --git a/src/xbus/service.h b/src/xbus/service.h index bb2e1f35c..d700c67af 100644 --- a/src/xbus/service.h +++ b/src/xbus/service.h @@ -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 m_pitch; DataRef m_roll; DataRef m_heading; + DataRef m_onGroundAny; + DataRef m_onGroundAll; DataRef m_com1Active; DataRef m_com1Standby; DataRef m_com2Active;