diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 2ec1464cb36ac2ddbb3489aef75c0d5248cdc0ea..128ab8b45a16258df0b0eb512e9db030ba1c44df 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 db98b2d19f8b31ce56f897f896feecb3155c2c90..6b22bc5e16257e7dc4714de94f0a74c4b5334d04 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);