QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleHygrometerFactGroup.h
Go to the documentation of this file.
1#pragma once
2
3#include "FactGroup.h"
4
6{
7 Q_OBJECT
8 Q_PROPERTY(Fact *hygroID READ hygroID CONSTANT)
9 Q_PROPERTY(Fact *hygroTemp READ hygroTemp CONSTANT)
10 Q_PROPERTY(Fact *hygroHumi READ hygroHumi CONSTANT)
11
12public:
13 explicit VehicleHygrometerFactGroup(QObject *parent = nullptr);
14
15 Fact *hygroID() { return &_hygroIDFact; }
16 Fact *hygroTemp() { return &_hygroTempFact; }
17 Fact *hygroHumi() { return &_hygroHumiFact; }
18
19 // Overrides from FactGroup
20 void handleMessage(Vehicle *vehicle, const mavlink_message_t &message) final;
21
22protected:
23 void _handleHygrometerSensor(const mavlink_message_t &message);
24
25 Fact _hygroTempFact = Fact(0, QStringLiteral("temperature"), FactMetaData::valueTypeDouble);
26 Fact _hygroHumiFact = Fact(0, QStringLiteral("humidity"), FactMetaData::valueTypeDouble);
27 Fact _hygroIDFact = Fact(0, QStringLiteral("hygrometerid"), FactMetaData::valueTypeUint16);
28};
struct __mavlink_message mavlink_message_t
Used to group Facts together into an object hierarachy.
Definition FactGroup.h:19
A Fact is used to hold a single value within the system.
Definition Fact.h:19
void _handleHygrometerSensor(const mavlink_message_t &message)