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
5class Fact;
6
8{
9 Q_OBJECT
10
11public:
12 SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
13
14 Q_PROPERTY(bool airspeedCalSupported READ _airspeedCalSupported STORED false NOTIFY setupCompleteChanged)
15 Q_PROPERTY(bool airspeedCalRequired READ _airspeedCalRequired STORED false NOTIFY setupCompleteChanged)
16
17 // Virtuals from VehicleComponent
18 QStringList setupCompleteChangedTriggerList(void) const override;
19
20 // Virtuals from VehicleComponent
21 virtual QString name(void) const override;
22 virtual QString description(void) const override;
23 QStringList searchKeywords() const override;
24 virtual QString iconResource(void) const override;
25 virtual bool requiresSetup(void) const override;
26
27 virtual int setupOrder() const override { return 1; }
28 virtual bool setupComplete(void) const override;
29 virtual QUrl setupSource(void) const override;
30
31 virtual QUrl summaryQmlSource(void) const override { return QUrl(); }
32
33 QList<VehicleSummaryItem> summaryItems() const override;
34 QStringList summaryChangedTriggerList() const override;
35
36private:
37 bool _airspeedCalSupported (void) const;
38 bool _airspeedCalRequired (void) const;
39 bool _airspeedVehicle(void) const;
40 bool _airspeedLegacyFirmware(void) const;
41 bool _airspeedParamExists(const char* name) const;
42 Fact* _airspeedParam(const char* name) const;
43
44 const QString _name;
45 QStringList _deviceIds;
46
47 static constexpr const char* _airspeedCalParam = "SENS_DPRES_OFF";
48 static constexpr const char* _airspeedPresentParam = "SYS_HAS_NUM_ASPD";
49 static constexpr const char* _airspeedModeParam = "FW_ARSP_MODE";
50 static constexpr const char* _airspeedCheckBreakerParam = "CBRK_AIRSPD_CHK";
51 static constexpr int _airspeedCheckBreakerDisabled = 162128;
52 static constexpr const char* _magEnabledParam = "SYS_HAS_MAG";
53 static constexpr const char* _magCalParam = "CAL_MAG0_ID";
54};
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
A Fact is used to hold a single value within the system.
Definition Fact.h:15
virtual bool requiresSetup(void) const override
virtual int setupOrder() const override
QList< VehicleSummaryItem > summaryItems() const override
Values for this component's card on the Summary page. A component with none falls back to summaryQmlS...
virtual QUrl setupSource(void) const override
virtual QString iconResource(void) const override
virtual QUrl summaryQmlSource(void) const override
QStringList summaryChangedTriggerList() const override
Parameters whose change emits summaryItemsChanged, besides those that change setupComplete.
QStringList setupCompleteChangedTriggerList(void) const override
virtual bool setupComplete(void) const override
virtual QString name(void) const override
SensorsComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
virtual QString description(void) const override
QStringList searchKeywords() const override
Translated search terms for the whole component, for pages without vehicleConfigJson() sections.
VehicleComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent, QObject *parent=nullptr)
void setupCompleteChanged()