QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4FlightBehavior.cc
Go to the documentation of this file.
1#include "PX4FlightBehavior.h"
2#include "QGCMAVLink.h"
3#include "Vehicle.h"
4
5PX4FlightBehavior::PX4FlightBehavior(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
6 : VehicleComponent(vehicle, autopilot, AutoPilotPlugin::UnknownVehicleComponent, parent)
7 , _name(tr("Flight Behavior"))
8{
9}
10
12{
13 return _name;
14}
15
17{
18 return tr("Configure mission, position hold, and altitude mode settings.");
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 = "";
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/PX4FlightBehaviorCopter.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 = "";
65 break;
66 default:
67 break;
68 }
69
70 return QUrl::fromUserInput(qmlFile);
71}
72
74{
75 return QUrl();
76}
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
QString name() const final
QUrl setupSource() const final
bool requiresSetup() const final
QString iconResource() const final
QStringList setupCompleteChangedTriggerList() const final
PX4FlightBehavior(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
QUrl summaryQmlSource() const final
QString description() const final
bool setupComplete() const final
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
MAV_TYPE vehicleType() const
Definition Vehicle.h:428