QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMFailsafesComponent.cc
Go to the documentation of this file.
2#include "Vehicle.h"
3#include "QGCMAVLink.h"
4
6 : VehicleComponent(vehicle, autopilot, AutoPilotPlugin::UnknownVehicleComponent, parent)
7{
8
9}
10
12{
13 return QStringLiteral(":/qml/QGroundControl/AutoPilotPlugins/APM/VehicleConfig/APMFailsafes.VehicleConfig.json");
14}
15
17{
18 switch (_vehicle->vehicleType()) {
19 case MAV_TYPE_SUBMARINE:
20 return tr("Configure failsafe actions and leak detection.");
21 case MAV_TYPE_GROUND_ROVER:
22 return tr("Configure battery, GCS, throttle, and EKF failsafes.");
23 case MAV_TYPE_FIXED_WING:
24 return tr("Configure battery, GCS, and throttle failsafes.");
25 default:
26 return tr("Configure battery, GCS, RC, throttle, EKF, and dead reckoning failsafes.");
27 }
28}
29
31{
32 switch (_vehicle->vehicleType()) {
33 case MAV_TYPE_SUBMARINE:
34 case MAV_TYPE_FIXED_WING:
35 case MAV_TYPE_QUADROTOR:
36 case MAV_TYPE_COAXIAL:
37 case MAV_TYPE_HELICOPTER:
38 case MAV_TYPE_HEXAROTOR:
39 case MAV_TYPE_OCTOROTOR:
40 case MAV_TYPE_TRICOPTER:
41 case MAV_TYPE_GROUND_ROVER:
42 // Generated from APMFailsafes.VehicleConfig.json
43 return QUrl::fromUserInput(QStringLiteral("qrc:/qml/QGroundControl/AutoPilotPlugins/APM/APMFailsafesComponent.qml"));
44 default:
45 return QUrl::fromUserInput(QStringLiteral("qrc:/qml/QGroundControl/AutoPilotPlugins/APM/APMNotSupported.qml"));
46 }
47}
48
50{
51 switch (_vehicle->vehicleType()) {
52 case MAV_TYPE_SUBMARINE:
53 return QUrl::fromUserInput(QStringLiteral("qrc:/qml/QGroundControl/AutoPilotPlugins/APM/APMFailsafesComponentSummarySub.qml"));
54 case MAV_TYPE_FIXED_WING:
55 case MAV_TYPE_QUADROTOR:
56 case MAV_TYPE_COAXIAL:
57 case MAV_TYPE_HELICOPTER:
58 case MAV_TYPE_HEXAROTOR:
59 case MAV_TYPE_OCTOROTOR:
60 case MAV_TYPE_TRICOPTER:
61 case MAV_TYPE_GROUND_ROVER:
62 return QUrl::fromUserInput(QStringLiteral("qrc:/qml/QGroundControl/AutoPilotPlugins/APM/APMFailsafesComponentSummary.qml"));
63 default:
64 return QUrl();
65 }
66}
APMFailsafesComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
QUrl setupSource() const final
QString description() const final
QUrl summaryQmlSource() const final
QString vehicleConfigJson() const final
Resource path to a VehicleConfig.json page definition, or empty if none.
MAV_TYPE vehicleType() const
Definition Vehicle.h:426