22 , _incorrectParameterVersion(false)
23 , _airframeComponent(
nullptr)
24 , _radioComponent(
nullptr)
25 , _esp8266Component(
nullptr)
26 , _flightModesComponent(
nullptr)
27 , _sensorsComponent(
nullptr)
28 , _safetyComponent(
nullptr)
29 , _powerComponent(
nullptr)
30 , _motorComponent(
nullptr)
31 , _actuatorComponent(
nullptr)
32 , _tuningComponent(
nullptr)
33 , _flightBehavior(
nullptr)
34 , _syslinkComponent(
nullptr)
35 , _joystickComponent(
nullptr)
38 qWarning() <<
"Internal error";
43 Q_CHECK_PTR(_airframeFacts);
85 bool showActuatorsPage =
false;
87 qCDebug(PX4AutoPilotPluginLog) <<
"Actuators page will NOT show because:";
88 qCDebug(PX4AutoPilotPluginLog) <<
" - Vehicle did not provide actuators metadata via component information";
90 qCDebug(PX4AutoPilotPluginLog) <<
"Actuators page will NOT show because:";
94 qCDebug(PX4AutoPilotPluginLog) <<
" - Condition 'show-ui-if' evaluated to false";
95 qCDebug(PX4AutoPilotPluginLog) <<
" (see 'Evaluating [show-ui-if]' log above for details)";
98 showActuatorsPage =
true;
99 qCDebug(PX4AutoPilotPluginLog) <<
"Actuators page WILL show (all conditions passed)";
102 if (showActuatorsPage) {
107 qCDebug(PX4AutoPilotPluginLog) <<
" → Using legacy Motor page instead";
139 qWarning() <<
"Call to vehicleCompenents prior to parametersReady";
148 qWarning() <<
"Internal error";
151 std::sort(_components.begin(), _components.end(), [](
const QVariant &a,
const QVariant &b) {
152 return a.value<VehicleComponent*>()->name().toLower() < b.value<VehicleComponent*>()->name().toLower();
164 QString hitlParam(
"SYS_HITL");
167 QGC::showAppMessage(tr(
"Warning: Hardware In The Loop (HITL) simulation is enabled for this vehicle."));
173 bool requiresAirframeCheck =
false;
175 if (qobject_cast<const FlightModesComponent*>(component)) {
186 }
else if (qobject_cast<const PX4RadioComponent*>(component)) {
190 }
else if (qobject_cast<const PX4TuningComponent*>(component)) {
191 requiresAirframeCheck =
true;
192 }
else if (qobject_cast<const PowerComponent*>(component)) {
193 requiresAirframeCheck =
true;
194 }
else if (qobject_cast<const SafetyComponent*>(component)) {
195 requiresAirframeCheck =
true;
196 }
else if (qobject_cast<const SensorsComponent*>(component)) {
197 requiresAirframeCheck =
true;
200 if (requiresAirframeCheck) {
#define QGC_LOGGING_CATEGORY(name, categoryStr)
const QString & initializationError() const
bool isInitialized() const
virtual QString name(void) const
virtual bool setupComplete(void) const
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
virtual void parametersReadyPreChecks()
QVariant rawValue() const
Value after translation.
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
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
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
virtual void setupTriggerSignals()
Actuators * actuators() const
ParameterManager * parameterManager()
void showAppMessage(const QString &message, const QString &title)
Modal application message. Queued if the UI isn't ready yet.