|
|
|
@ -1,24 +1,24 @@
@@ -1,24 +1,24 @@
|
|
|
|
|
/*=====================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGroundControl Open Source Ground Control Station |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This file is part of the QGROUNDCONTROL project |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
|
|
|
|
it under the terms of the GNU General Public License as published by |
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
|
|
|
(at your option) any later version. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGROUNDCONTROL is distributed in the hope that it will be useful, |
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
|
GNU General Public License for more details. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
|
|
|
|
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
======================================================================*/ |
|
|
|
|
|
|
|
|
|
/// @file
|
|
|
|
@ -67,7 +67,7 @@ bool SafetyComponent::setupComplete(void) const
@@ -67,7 +67,7 @@ bool SafetyComponent::setupComplete(void) const
|
|
|
|
|
QString SafetyComponent::setupStateDescription(void) const |
|
|
|
|
{ |
|
|
|
|
const char* stateDescription; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (requiresSetup()) { |
|
|
|
|
stateDescription = "Requires setup"; |
|
|
|
|
} else { |
|
|
|
@ -84,7 +84,7 @@ const char** SafetyComponent::setupCompleteChangedTriggerList(void) const
@@ -84,7 +84,7 @@ const char** SafetyComponent::setupCompleteChangedTriggerList(void) const
|
|
|
|
|
QStringList SafetyComponent::paramFilterList(void) const |
|
|
|
|
{ |
|
|
|
|
QStringList list; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -92,11 +92,11 @@ QWidget* SafetyComponent::setupWidget(void) const
@@ -92,11 +92,11 @@ QWidget* SafetyComponent::setupWidget(void) const
|
|
|
|
|
{ |
|
|
|
|
QGCQmlWidgetHolder* holder = new QGCQmlWidgetHolder(); |
|
|
|
|
Q_CHECK_PTR(holder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
holder->setAutoPilot(_autopilot); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
holder->setSource(QUrl::fromUserInput("qrc:/qml/SafetyComponent.qml")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return holder; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -109,10 +109,10 @@ QString SafetyComponent::prerequisiteSetup(void) const
@@ -109,10 +109,10 @@ QString SafetyComponent::prerequisiteSetup(void) const
|
|
|
|
|
{ |
|
|
|
|
PX4AutoPilotPlugin* plugin = dynamic_cast<PX4AutoPilotPlugin*>(_autopilot); |
|
|
|
|
Q_ASSERT(plugin); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!plugin->airframeComponent()->setupComplete()) { |
|
|
|
|
return plugin->airframeComponent()->name(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return QString(); |
|
|
|
|
} |
|
|
|
|