39#ifndef QGC_NO_SERIAL_LINK
51#ifndef QGC_NO_SERIAL_LINK
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)));
89 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_airspeedComponent)));
94 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_powerComponent)));
98 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_escComponent)));
103 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_motorComponent)));
109 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_servoComponent)));
118 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_failsafesComponent)));
125 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_followComponent)));
132 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_heliComponent)));
137 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_tuningComponent)));
147 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_gimbalComponent)));
152 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_lightsComponent)));
157 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_subFrameComponent)));
165 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_esp8266Component)));
170 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_loggingComponent)));
178 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_joystickComponent)));
182 _components.append(QVariant::fromValue(qobject_cast<VehicleComponent*>(
_scriptingComponent)));
184 qCWarning(APMAutoPilotPluginLog) <<
"Call to vehicleComponents prior to parametersReady";
187 std::sort(_components.begin(), _components.end(), [](
const QVariant &a,
const QVariant &b) {
188 return a.value<VehicleComponent*>()->name().toLower() < b.value<VehicleComponent*>()->name().toLower();
197 bool requiresAirframeCheck =
false;
199 if (qobject_cast<const APMFlightModesComponent*>(component)) {
206 requiresAirframeCheck =
true;
207 }
else if (qobject_cast<const APMRadioComponent*>(component)) {
208 requiresAirframeCheck =
true;
209 }
else if (qobject_cast<const APMPowerComponent*>(component)) {
210 requiresAirframeCheck =
true;
211 }
else if (qobject_cast<const APMESCComponent*>(component)) {
212 requiresAirframeCheck =
true;
213 }
else if (qobject_cast<const APMFlightSafetyComponent*>(component)) {
214 requiresAirframeCheck =
true;
215 }
else if (qobject_cast<const APMTuningComponent*>(component)) {
216 requiresAirframeCheck =
true;
217 }
else if (qobject_cast<const APMSensorsComponent*>(component)) {
218 requiresAirframeCheck =
true;
219 }
else if (qobject_cast<const APMAirspeedComponent*>(component)) {
220 requiresAirframeCheck =
true;
223 if (requiresAirframeCheck) {
232#ifndef QGC_NO_SERIAL_LINK
233void APMAutoPilotPlugin::_checkForBadCubeBlack(
bool parametersReady)
235 if (!parametersReady) {
248 const SerialLink *serialLink = qobject_cast<const SerialLink*>(sharedLink.get());
259 static const QString paramAcc3 = QStringLiteral(
"INS_ACC3_ID");
260 static const QString paramGyr3 = QStringLiteral(
"INS_GYR3_ID");
261 static const QString paramEnableMask = QStringLiteral(
"INS_ENABLE_MASK");
267 "WARNING: The flight board you are using has a critical service bulletin against it which advises against flying. "
268 "For details see: https://discuss.cubepilot.org/t/sb-0000002-critical-service-bulletin-for-cubes-purchased-between-january-2019-to-present-do-not-fly/406"
std::shared_ptr< LinkInterface > SharedLinkInterfacePtr
#define QGC_LOGGING_CATEGORY(name, categoryStr)
QString name() const final
bool setupComplete() const final
This is the AutoPilotPlugin implementation for the MAV_AUTOPILOT_ARDUPILOT type.
QString prerequisiteSetup(VehicleComponent *component) const override
Returns the name of the vehicle component which must complete setup prior to this one....
APMLoggingComponent * _loggingComponent
ScriptingComponent * _scriptingComponent
APMAdvancedTuningCopterComponent * _advancedTuningCopterComponent
APMAirframeComponent * _airframeComponent
APMHeliComponent * _heliComponent
const QVariantList & vehicleComponents() override
APMRadioComponent * _radioComponent
APMFlightModesComponent * _flightModesComponent
APMMotorComponent * _motorComponent
APMServoComponent * _servoComponent
APMAirspeedComponent * _airspeedComponent
APMLightsComponent * _lightsComponent
APMFollowComponent * _followComponent
APMTuningComponent * _tuningComponent
ESP8266Component * _esp8266Component
APMFlightSafetyComponent * _flightSafetyComponent
JoystickComponent * _joystickComponent
APMGimbalComponent * _gimbalComponent
APMSensorsComponent * _sensorsComponent
APMPowerComponent * _powerComponent
APMESCComponent * _escComponent
bool _incorrectParameterVersion
true: parameter version incorrect, setup not allowed
APMFailsafesComponent * _failsafesComponent
APMRemoteSupportComponent * _apmRemoteSupportComponent
APMSubFrameComponent * _subFrameComponent
bool setupComplete() const final
QString name() const final
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
QVariant rawValue() const
Value after translation.
bool parameterExists(int componentId, const QString ¶mName) const
Fact * getParameter(int componentId, const QString ¶mName)
void parametersReadyChanged(bool parametersReady)
bool parametersReady() const
QGC's version of Qt QSerialPortInfo. It provides additional information about board types that QGC ca...
const QSerialPort * port() const
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
virtual void setupTriggerSignals()
WeakLinkInterfacePtr primaryLink() const
MAV_TYPE vehicleType() const
VehicleLinkManager * vehicleLinkManager()
FirmwarePlugin * firmwarePlugin()
Provides access to the Firmware Plugin for this Vehicle.
ParameterManager * parameterManager()
VehicleSupports * supports()
Q_INVOKABLE int versionCompare(const QString &compare) const
Used to check if running current version is equal or higher than the one being compared.
void showAppMessage(const QString &message, const QString &title)
Modal application message. Queued if the UI isn't ready yet.