diff --git a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc index 0e9873862fb43a139c6c73dd4c3edc7e0d33472d..6b198e823b290a57dae6ab216f3c926c9c12d8ba 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc +++ b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc @@ -40,7 +40,9 @@ bool AirframeComponentController::_typesRegistered = false; AirframeComponentController::AirframeComponentController(QObject* parent) : QObject(parent), _uas(NULL), - _autoPilotPlugin(NULL) + _autoPilotPlugin(NULL), + _currentVehicleIndex(0), + _autostartId(0) { _uas = UASManager::instance()->getActiveUAS(); Q_ASSERT(_uas); @@ -80,9 +82,11 @@ AirframeComponentController::AirframeComponentController(QObject* parent) : _airframeTypes.append(QVariant::fromValue(airframeType)); } - // FIXME: Should be a user error - Q_UNUSED(autostartFound); - Q_ASSERT(autostartFound); + if (_autostartId != 0) { + // FIXME: Should be a user error + Q_UNUSED(autostartFound); + Q_ASSERT(autostartFound); + } } AirframeComponentController::~AirframeComponentController()