From 1cc531ac76abcaec17abada4a30b988a89c7767f Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 26 Apr 2015 11:24:38 -0700 Subject: [PATCH] Fix SYS_AUTOSTART=0 issue --- .../PX4/AirframeComponentController.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc index 0e9873862..6b198e823 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() -- 2.22.0