QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SysStatusSensorInfo.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QMap>
4#include <QtCore/QObject>
5
6#include "MAVLinkLib.h"
7
10class SysStatusSensorInfo : public QObject
11{
12 Q_OBJECT
13 Q_PROPERTY(QStringList sensorNames READ sensorNames NOTIFY sensorInfoChanged)
14 Q_PROPERTY(QStringList sensorStatus READ sensorStatus NOTIFY sensorInfoChanged)
15
16public:
17 explicit SysStatusSensorInfo(QObject *parent = nullptr);
19
20 void update(const mavlink_sys_status_t &sysStatus);
21 QStringList sensorNames() const;
22 QStringList sensorStatus() const;
23
24signals:
26
27private:
28 struct SensorInfo {
29 bool enabled = false;
30 bool healthy = false;
31 };
32
33 QMap<MAV_SYS_STATUS_SENSOR, SensorInfo> _sensorInfoMap;
34};
Class which represents sensor info from the SYS_STATUS mavlink message.
QStringList sensorStatus() const
void update(const mavlink_sys_status_t &sysStatus)
QStringList sensorNames() const