QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PowerComponent.cc
Go to the documentation of this file.
1#include "PowerComponent.h"
2#include "ParameterManager.h"
3#include "Vehicle.h"
4
5PowerComponent::PowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
6 : VehicleComponent(vehicle, autopilot, AutoPilotPlugin::KnownPowerVehicleComponent, parent)
7 , _name(tr("Power"))
8{
9}
10
11QString PowerComponent::name(void) const
12{
13 return _name;
14}
15
16QString PowerComponent::description(void) const
17{
18 return tr("Configure battery parameters, ESC calibration, and UAVCAN bus settings.");
19}
20
22{
23 return "/qmlimages/Battery.svg";
24}
25
27{
28 return true;
29}
30
44
46{
47 return {"BAT1_SOURCE", "BAT1_V_CHARGED", "BAT1_V_EMPTY", "BAT1_N_CELLS"};
48}
49
51{
52 // Generated from Power.VehicleConfig.json
53 return QUrl::fromUserInput("qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PowerComponent.qml");
54}
55
57{
58 return QUrl::fromUserInput("qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PowerComponentSummary.qml");
59}
60
62{
63 return QStringLiteral(":/qml/QGroundControl/AutoPilotPlugins/PX4/VehicleConfig/Power.VehicleConfig.json");
64}
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
QVariant rawValue() const
Value after translation.
Definition Fact.h:85
bool parameterExists(int componentId, const QString &paramName) const
Fact * getParameter(int componentId, const QString &paramName)
static constexpr int defaultComponentId
QStringList setupCompleteChangedTriggerList(void) const override
QString name(void) const override
bool requiresSetup(void) const override
QString description(void) const override
bool setupComplete(void) const override
PowerComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
QString vehicleConfigJson(void) const override
Resource path to a VehicleConfig.json page definition, or empty if none.
QUrl summaryQmlSource(void) const override
QUrl setupSource(void) const override
QString iconResource(void) const override
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
ParameterManager * parameterManager()
Definition Vehicle.h:573