17 , _incorrectParameterVersion(false)
18 , _airframeComponent(nullptr)
19 , _radioComponent(nullptr)
20 , _esp8266Component(nullptr)
21 , _flightModesComponent(nullptr)
22 , _sensorsComponent(nullptr)
23 , _safetyComponent(nullptr)
24 , _powerComponent(nullptr)
25 , _motorComponent(nullptr)
26 , _actuatorComponent(nullptr)
27 , _tuningComponent(nullptr)
28 , _flightBehavior(nullptr)
29 , _syslinkComponent(nullptr)
30 , _joystickComponent(nullptr)
33 qWarning() <<
"Internal error";
80 bool showActuatorsPage =
false;
82 qCDebug(ActuatorsConfigLog) <<
"Actuators page will NOT show because:";
83 qCDebug(ActuatorsConfigLog) <<
" - Vehicle did not provide actuators metadata via component information";
85 qCDebug(ActuatorsConfigLog) <<
"Actuators page will NOT show because:";
89 qCDebug(ActuatorsConfigLog) <<
" - Condition 'show-ui-if' evaluated to false";
90 qCDebug(ActuatorsConfigLog) <<
" (see 'Evaluating [show-ui-if]' log above for details)";
93 showActuatorsPage =
true;
94 qCDebug(ActuatorsConfigLog) <<
"Actuators page WILL show (all conditions passed)";
97 if (showActuatorsPage) {
102 qCDebug(ActuatorsConfigLog) <<
" → Using legacy Motor page instead";
134 qWarning() <<
"Call to vehicleCompenents prior to parametersReady";
143 qWarning() <<
"Internal error";
153 AutoPilotPlugin::parametersReadyPreChecks();
155 QString hitlParam(
"SYS_HITL");
158 qgcApp()->showAppMessage(tr(
"Warning: Hardware In The Loop (HITL) simulation is enabled for this vehicle."));
164 bool requiresAirframeCheck =
false;
166 if (qobject_cast<const FlightModesComponent*>(component)) {
177 }
else if (qobject_cast<const PX4RadioComponent*>(component)) {
181 }
else if (qobject_cast<const PX4TuningComponent*>(component)) {
182 requiresAirframeCheck =
true;
183 }
else if (qobject_cast<const PowerComponent*>(component)) {
184 requiresAirframeCheck =
true;
185 }
else if (qobject_cast<const SafetyComponent*>(component)) {
186 requiresAirframeCheck =
true;
187 }
else if (qobject_cast<const SensorsComponent*>(component)) {
188 requiresAirframeCheck =
true;
191 if (requiresAirframeCheck) {
const QString & initializationError() const
bool isInitialized() const
virtual QString name(void) const
virtual bool setupComplete(void) const
Collection of Parameter Facts for PX4 AutoPilot.
static void loadAirframeMetaData(void)
SafetyComponent * _safetyComponent
PX4RadioComponent * _radioComponent
bool _incorrectParameterVersion
true: parameter version incorrect, setup not allowed
QString prerequisiteSetup(VehicleComponent *component) const override
Returns the name of the vehicle component which must complete setup prior to this one....
AirframeComponent * _airframeComponent
PowerComponent * _powerComponent
PX4TuningComponent * _tuningComponent
const QVariantList & vehicleComponents(void) override
void parametersReadyPreChecks(void) override
JoystickComponent * _joystickComponent
PX4AutoPilotPlugin(Vehicle *vehicle, QObject *parent)
SyslinkComponent * _syslinkComponent
PX4FlightBehavior * _flightBehavior
ActuatorComponent * _actuatorComponent
ESP8266Component * _esp8266Component
PX4AirframeLoader * _airframeFacts
SensorsComponent * _sensorsComponent
MotorComponent * _motorComponent
FlightModesComponent * _flightModesComponent
virtual QString name(void) const
virtual bool setupComplete(void) const
bool parameterExists(int componentId, const QString ¶mName) const
Fact * getParameter(int componentId, const QString ¶mName)
bool parametersReady() const
static constexpr int defaultComponentId
Actuators * actuators() const
ParameterManager * parameterManager()