Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
909e6dda
Commit
909e6dda
authored
Mar 11, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow VehicleComponent setup while armed
parent
0d7fd3ce
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
32 deletions
+47
-32
APMSafetyComponent.h
src/AutoPilotPlugins/APM/APMSafetyComponent.h
+2
-1
APMTuningComponent.h
src/AutoPilotPlugins/APM/APMTuningComponent.h
+2
-1
PX4TuningComponent.h
src/AutoPilotPlugins/PX4/PX4TuningComponent.h
+11
-10
PX4TuningComponentCopter.qml
src/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml
+2
-1
SafetyComponent.h
src/AutoPilotPlugins/PX4/SafetyComponent.h
+11
-10
SetupView.qml
src/VehicleSetup/SetupView.qml
+1
-1
VehicleComponent.cc
src/VehicleSetup/VehicleComponent.cc
+6
-0
VehicleComponent.h
src/VehicleSetup/VehicleComponent.h
+12
-8
No files found.
src/AutoPilotPlugins/APM/APMSafetyComponent.h
View file @
909e6dda
...
...
@@ -45,7 +45,8 @@ public:
QUrl
setupSource
(
void
)
const
final
;
QUrl
summaryQmlSource
(
void
)
const
final
;
QString
prerequisiteSetup
(
void
)
const
final
;
bool
allowSetupWhileArmed
(
void
)
const
final
{
return
true
;
}
private:
const
QString
_name
;
QVariantList
_summaryItems
;
...
...
src/AutoPilotPlugins/APM/APMTuningComponent.h
View file @
909e6dda
...
...
@@ -45,7 +45,8 @@ public:
QUrl
setupSource
(
void
)
const
final
;
QUrl
summaryQmlSource
(
void
)
const
final
;
QString
prerequisiteSetup
(
void
)
const
final
;
bool
allowSetupWhileArmed
(
void
)
const
final
{
return
true
;
}
private:
const
QString
_name
;
QVariantList
_summaryItems
;
...
...
src/AutoPilotPlugins/PX4/PX4TuningComponent.h
View file @
909e6dda
...
...
@@ -34,18 +34,19 @@ public:
PX4TuningComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Virtuals from VehicleComponent
virtual
QStringList
setupCompleteChangedTriggerList
(
void
)
const
;
QStringList
setupCompleteChangedTriggerList
(
void
)
const
final
;
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
iconResource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QUrl
setupSource
(
void
)
const
;
virtual
QUrl
summaryQmlSource
(
void
)
const
;
virtual
QString
prerequisiteSetup
(
void
)
const
;
QString
name
(
void
)
const
final
;
QString
description
(
void
)
const
final
;
QString
iconResource
(
void
)
const
final
;
bool
requiresSetup
(
void
)
const
final
;
bool
setupComplete
(
void
)
const
final
;
QUrl
setupSource
(
void
)
const
final
;
QUrl
summaryQmlSource
(
void
)
const
final
;
QString
prerequisiteSetup
(
void
)
const
final
;
bool
allowSetupWhileArmed
(
void
)
const
final
{
return
true
;
}
private:
const
QString
_name
;
};
...
...
src/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml
View file @
909e6dda
...
...
@@ -27,7 +27,8 @@ import QtQuick.Controls 1.4
import
QGroundControl
.
Controls
1.0
FactSliderPanel
{
anchors.fill
:
parent
anchors.fill
:
parent
panelTitle
:
"
Tuning
"
sliderModel
:
ListModel
{
ListElement
{
...
...
src/AutoPilotPlugins/PX4/SafetyComponent.h
View file @
909e6dda
...
...
@@ -39,18 +39,19 @@ public:
SafetyComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Virtuals from VehicleComponent
virtual
QStringList
setupCompleteChangedTriggerList
(
void
)
const
;
QStringList
setupCompleteChangedTriggerList
(
void
)
const
;
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
iconResource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QUrl
setupSource
(
void
)
const
;
virtual
QUrl
summaryQmlSource
(
void
)
const
;
virtual
QString
prerequisiteSetup
(
void
)
const
;
QString
name
(
void
)
const
final
;
QString
description
(
void
)
const
final
;
QString
iconResource
(
void
)
const
final
;
bool
requiresSetup
(
void
)
const
final
;
bool
setupComplete
(
void
)
const
final
;
QUrl
setupSource
(
void
)
const
final
;
QUrl
summaryQmlSource
(
void
)
const
final
;
QString
prerequisiteSetup
(
void
)
const
final
;
bool
allowSetupWhileArmed
(
void
)
const
final
{
return
true
;
}
private:
const
QString
_name
;
QVariantList
_summaryItems
;
...
...
src/VehicleSetup/SetupView.qml
View file @
909e6dda
...
...
@@ -101,7 +101,7 @@ Rectangle {
function
showVehicleComponentPanel
(
vehicleComponent
)
{
if
(
multiVehicleManager
.
activeVehicle
.
armed
)
{
if
(
multiVehicleManager
.
activeVehicle
.
armed
&&
!
vehicleComponent
.
allowSetupWhileArmed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
sourceComponent
=
messagePanelComponent
}
else
{
...
...
src/VehicleSetup/VehicleComponent.cc
View file @
909e6dda
...
...
@@ -73,3 +73,9 @@ void VehicleComponent::_triggerUpdated(QVariant /*value*/)
{
emit
setupCompleteChanged
(
setupComplete
());
}
bool
VehicleComponent
::
allowSetupWhileArmed
(
void
)
const
{
// Default is to not allow setup while armed
return
false
;
}
src/VehicleSetup/VehicleComponent.h
View file @
909e6dda
...
...
@@ -42,14 +42,15 @@ class VehicleComponent : public QObject
{
Q_OBJECT
Q_PROPERTY
(
QString
name
READ
name
CONSTANT
)
Q_PROPERTY
(
QString
description
READ
description
CONSTANT
)
Q_PROPERTY
(
bool
requiresSetup
READ
requiresSetup
CONSTANT
)
Q_PROPERTY
(
bool
setupComplete
READ
setupComplete
STORED
false
NOTIFY
setupCompleteChanged
)
Q_PROPERTY
(
QString
iconResource
READ
iconResource
CONSTANT
)
Q_PROPERTY
(
QUrl
setupSource
READ
setupSource
CONSTANT
)
Q_PROPERTY
(
QUrl
summaryQmlSource
READ
summaryQmlSource
CONSTANT
)
Q_PROPERTY
(
QString
prerequisiteSetup
READ
prerequisiteSetup
)
Q_PROPERTY
(
QString
name
READ
name
CONSTANT
)
Q_PROPERTY
(
QString
description
READ
description
CONSTANT
)
Q_PROPERTY
(
bool
requiresSetup
READ
requiresSetup
CONSTANT
)
Q_PROPERTY
(
bool
setupComplete
READ
setupComplete
STORED
false
NOTIFY
setupCompleteChanged
)
Q_PROPERTY
(
QString
iconResource
READ
iconResource
CONSTANT
)
Q_PROPERTY
(
QUrl
setupSource
READ
setupSource
CONSTANT
)
Q_PROPERTY
(
QUrl
summaryQmlSource
READ
summaryQmlSource
CONSTANT
)
Q_PROPERTY
(
QString
prerequisiteSetup
READ
prerequisiteSetup
CONSTANT
)
Q_PROPERTY
(
bool
allowSetupWhileArmed
READ
allowSetupWhileArmed
CONSTANT
)
public:
VehicleComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
...
...
@@ -63,6 +64,9 @@ public:
virtual
QUrl
setupSource
(
void
)
const
=
0
;
virtual
QUrl
summaryQmlSource
(
void
)
const
=
0
;
virtual
QString
prerequisiteSetup
(
void
)
const
=
0
;
// @return true: Setup panel can be shown while vehicle is armed
virtual
bool
allowSetupWhileArmed
(
void
)
const
;
virtual
void
addSummaryQmlComponent
(
QQmlContext
*
context
,
QQuickItem
*
parent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment