64 if (
_vehicle->parameterManager()->parametersReady()) {
67 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_airframeComponent)));
72 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_radioComponent)));
84 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_sensorsComponent)));
86 if (
_vehicle->parameterManager()->parameterExists(-1, QStringLiteral(
"ARSPD_TYPE"))) {
89 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_airspeedComponent)));
94 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_powerComponent)));
97 if (
_vehicle->parameterManager()->parameterExists(-1, QStringLiteral(
"MOT_PWM_TYPE")) ||
98 _vehicle->parameterManager()->parameterExists(-1, QStringLiteral(
"Q_M_PWM_TYPE"))) {
101 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_escComponent)));
107 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_motorComponent)));
110 if (
_vehicle->parameterManager()->parameterExists(-1, QStringLiteral(
"SERVO1_MIN"))) {
113 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_servoComponent)));
122 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_failsafesComponent)));
125 if ((qobject_cast<ArduCopterFirmwarePlugin*>(
_vehicle->firmwarePlugin()) || qobject_cast<ArduRoverFirmwarePlugin*>(
_vehicle->firmwarePlugin())) &&
126 _vehicle->parameterManager()->parameterExists(-1, QStringLiteral(
"FOLL_ENABLE"))) {
129 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_followComponent)));
133 if (
_vehicle->vehicleType() == MAV_TYPE_HELICOPTER && (
_vehicle->versionCompare(4, 0, 0) >= 0)) {
136 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_heliComponent)));
142 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_tuningComponent)));
153 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_gimbalComponent)));
158 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_lightsComponent)));
160 if (
_vehicle->versionCompare(3, 5, 0) >= 0) {
163 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_subFrameComponent)));
168 if (
_vehicle->parameterManager()->parameterExists(MAV_COMP_ID_UDP_BRIDGE,
"SW_VER")) {
171 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_esp8266Component)));
176 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_loggingComponent)));
184 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_joystickComponent)));
188 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_scriptingComponent)));
190 qCWarning(APMAutoPilotPluginLog) <<
"Call to vehicleComponents prior to parametersReady";
193 std::sort(_components.begin(), _components.end(), [](
const QVariant &a,
const QVariant &b) {
194 return a.value<VehicleComponent*>()->name().toLower() < b.value<VehicleComponent*>()->name().toLower();
203 bool requiresAirframeCheck =
false;
205 if (qobject_cast<const APMFlightModesComponent*>(component)) {
212 requiresAirframeCheck =
true;
213 }
else if (qobject_cast<const APMRadioComponent*>(component)) {
214 requiresAirframeCheck =
true;
215 }
else if (qobject_cast<const APMPowerComponent*>(component)) {
216 requiresAirframeCheck =
true;
217 }
else if (qobject_cast<const APMESCComponent*>(component)) {
218 requiresAirframeCheck =
true;
219 }
else if (qobject_cast<const APMFlightSafetyComponent*>(component)) {
220 requiresAirframeCheck =
true;
221 }
else if (qobject_cast<const APMTuningComponent*>(component)) {
222 requiresAirframeCheck =
true;
223 }
else if (qobject_cast<const APMSensorsComponent*>(component)) {
224 requiresAirframeCheck =
true;
225 }
else if (qobject_cast<const APMAirspeedComponent*>(component)) {
226 requiresAirframeCheck =
true;
229 if (requiresAirframeCheck) {