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/QLoggingCategory>
4#include <QtCore/QMap>
5#include <QtCore/QObject>
6
7#include "MAVLinkLib.h"
8
9Q_DECLARE_LOGGING_CATEGORY(SysStatusSensorInfoLog)
10
11
12class SysStatusSensorInfo : public QObject
13{
14 Q_OBJECT
15 Q_PROPERTY(QStringList sensorNames READ sensorNames NOTIFY sensorInfoChanged)
16 Q_PROPERTY(QStringList sensorStatus READ sensorStatus NOTIFY sensorInfoChanged)
17
18public:
19 explicit SysStatusSensorInfo(QObject *parent = nullptr);
21
22 void update(const mavlink_sys_status_t &sysStatus);
23 QStringList sensorNames() const;
24 QStringList sensorStatus() const;
25
26signals:
28
29private:
30 struct SensorInfo {
31 bool enabled = false;
32 bool healthy = false;
33 };
34
35 QMap<MAV_SYS_STATUS_SENSOR, SensorInfo> _sensorInfoMap;
36};
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
Class which represents sensor info from the SYS_STATUS mavlink message.