QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4TuningComponent.cc
Go to the documentation of this file.
2#include "QGCMAVLink.h"
3#include "Vehicle.h"
4
6 : VehicleComponent(vehicle, autopilot, AutoPilotPlugin::UnknownVehicleComponent, parent)
7 , _name(tr("PID Tuning"))
8{
9}
10
11QString PX4TuningComponent::name(void) const
12{
13 return _name;
14}
15
17{
18 return tr("Tuning Setup is used to tune the flight controllers.");
19}
20
22{
23 return "/qmlimages/TuningComponentIcon.png";
24}
25
27{
28 return false;
29}
30
32{
33 return true;
34}
35
37{
38 return QStringList();
39}
40
42{
43 QString qmlFile;
44
45 switch (_vehicle->vehicleType()) {
46 case MAV_TYPE_FIXED_WING:
47 qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentPlane.qml";
48 break;
49 case MAV_TYPE_QUADROTOR:
50 case MAV_TYPE_COAXIAL:
51 case MAV_TYPE_HELICOPTER:
52 case MAV_TYPE_HEXAROTOR:
53 case MAV_TYPE_OCTOROTOR:
54 case MAV_TYPE_TRICOPTER:
55 qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml";
56 break;
57 case MAV_TYPE_VTOL_TAILSITTER_DUOROTOR:
58 case MAV_TYPE_VTOL_TAILSITTER_QUADROTOR:
59 case MAV_TYPE_VTOL_TILTROTOR:
60 case MAV_TYPE_VTOL_FIXEDROTOR:
61 case MAV_TYPE_VTOL_TAILSITTER:
62 case MAV_TYPE_VTOL_TILTWING:
63 case MAV_TYPE_VTOL_RESERVED5:
64 qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentVTOL.qml";
65 break;
66 case MAV_TYPE_SPACECRAFT_ORBITER:
67 // Spacecraft Type
68 qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentSpacecraft.qml";
69 break;
70 default:
71 break;
72 }
73
74 return QUrl::fromUserInput(qmlFile);
75}
76
78{
79 return QUrl();
80}
QString description(void) const final
bool requiresSetup(void) const final
PX4TuningComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
QString name(void) const final
QStringList setupCompleteChangedTriggerList(void) const final
bool setupComplete(void) const final
QString iconResource(void) const final
QUrl setupSource(void) const final
QUrl summaryQmlSource(void) const final
MAV_TYPE vehicleType() const
Definition Vehicle.h:428