From 9972ac752bb0cb1e3702311dbc1b599967dc629a Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Wed, 9 May 2018 10:23:43 -0700 Subject: [PATCH] Added sensorsUnhealthyBits --- src/Vehicle/Vehicle.cc | 1 + src/Vehicle/Vehicle.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 2ec1464cb..128ab8b45 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1302,6 +1302,7 @@ void Vehicle::_handleSysStatus(mavlink_message_t& message) if (newSensorsUnhealthy != _onboardControlSensorsUnhealthy) { _onboardControlSensorsUnhealthy = newSensorsUnhealthy; emit unhealthySensorsChanged(); + emit sensorsUnhealthyBitsChanged(_onboardControlSensorsUnhealthy); } } diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index db98b2d19..6b22bc5e1 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -466,6 +466,7 @@ public: Q_PROPERTY(int sensorsPresentBits READ sensorsPresentBits NOTIFY sensorsPresentBitsChanged) Q_PROPERTY(int sensorsEnabledBits READ sensorsEnabledBits NOTIFY sensorsEnabledBitsChanged) Q_PROPERTY(int sensorsHealthBits READ sensorsHealthBits NOTIFY sensorsHealthBitsChanged) + Q_PROPERTY(int sensorsUnhealthyBits READ sensorsUnhealthyBits NOTIFY sensorsUnhealthyBitsChanged) ///< Combination of enabled and health Q_PROPERTY(QString missionFlightMode READ missionFlightMode CONSTANT) Q_PROPERTY(QString pauseFlightMode READ pauseFlightMode CONSTANT) Q_PROPERTY(QString rtlFlightMode READ rtlFlightMode CONSTANT) @@ -769,6 +770,7 @@ public: int sensorsPresentBits () const { return _onboardControlSensorsPresent; } int sensorsEnabledBits () const { return _onboardControlSensorsEnabled; } int sensorsHealthBits () const { return _onboardControlSensorsHealth; } + int sensorsUnhealthyBits () const { return _onboardControlSensorsUnhealthy; } QString missionFlightMode () const; QString pauseFlightMode () const; QString rtlFlightMode () const; @@ -971,6 +973,7 @@ signals: void sensorsPresentBitsChanged (int sensorsPresentBits); void sensorsEnabledBitsChanged (int sensorsEnabledBits); void sensorsHealthBitsChanged (int sensorsHealthBits); + void sensorsUnhealthyBitsChanged(int sensorsUnhealthyBits); void firmwareVersionChanged(void); void firmwareCustomVersionChanged(void); -- 2.22.0