QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SensorsComponent.h
Go to the documentation of this file.
1#pragma once
2
3#include "VehicleComponent.h"
4
6{
7 Q_OBJECT
8
9public:
10 SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
11
12 Q_PROPERTY(bool airspeedCalSupported READ _airspeedCalSupported STORED false NOTIFY setupCompleteChanged)
13 Q_PROPERTY(bool airspeedCalRequired READ _airspeedCalRequired STORED false NOTIFY setupCompleteChanged)
14
15 // Virtuals from VehicleComponent
16 QStringList setupCompleteChangedTriggerList(void) const override;
17
18 // Virtuals from VehicleComponent
19 virtual QString name(void) const override;
20 virtual QString description(void) const override;
21 virtual QString iconResource(void) const override;
22 virtual bool requiresSetup(void) const override;
23 virtual bool setupComplete(void) const override;
24 virtual QUrl setupSource(void) const override;
25 virtual QUrl summaryQmlSource(void) const override;
26 QStringList sections() const override;
27 bool showFirstSectionOnRootClick() const override { return true; }
28 bool sectionSetupComplete(const QString &sectionName) const override;
29
30private:
31 bool _airspeedCalSupported (void) const;
32 bool _airspeedCalRequired (void) const;
33
34 const QString _name;
35 QVariantList _summaryItems;
36 QStringList _deviceIds;
37 QStringList _airspeedCalTriggerParams;
38
39 static constexpr const char* _airspeedBreakerParam = "CBRK_AIRSPD_CHK";
40 static constexpr const char* _airspeedDisabledParam = "FW_ARSP_MODE";
41 static constexpr const char* _airspeedCalParam = "SENS_DPRES_OFF";
42 static constexpr const char* _magEnabledParam = "SYS_HAS_MAG";
43 static constexpr const char* _magCalParam = "CAL_MAG0_ID";
44};
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
virtual bool requiresSetup(void) const override
bool showFirstSectionOnRootClick() const override
When true, clicking the root component in the tree selects the first section instead of showing all.
virtual QUrl setupSource(void) const override
virtual QString iconResource(void) const override
bool sectionSetupComplete(const QString &sectionName) const override
Returns setup-complete status for a named section. Default returns true (no per-section tracking).
QStringList setupCompleteChangedTriggerList(void) const override
QStringList sections() const override
virtual bool setupComplete(void) const override
virtual QString name(void) const override
virtual QUrl summaryQmlSource(void) const override
virtual QString description(void) const override
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
void setupCompleteChanged()