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
bbdf6dde
Commit
bbdf6dde
authored
Mar 11, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2998 from DonLakeFlyer/AllowArmedSetup
Allow armed setup for Safety/Tuning
parents
b0bd3449
3af86735
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
53 deletions
+70
-53
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
FactSliderPanel.qml
src/QmlControls/FactSliderPanel.qml
+22
-21
SetupView.qml
src/VehicleSetup/SetupView.qml
+1
-1
VehicleComponent.cc
src/VehicleSetup/VehicleComponent.cc
+6
-0
VehicleComponent.h
src/VehicleSetup/VehicleComponent.h
+12
-8
PX4MockLink.params
src/comm/PX4MockLink.params
+1
-0
No files found.
src/AutoPilotPlugins/APM/APMSafetyComponent.h
View file @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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/QmlControls/FactSliderPanel.qml
View file @
bbdf6dde
...
...
@@ -80,30 +80,31 @@ QGCView {
font.weight
:
Font
.
DemiBold
}
Rectangle
{
id
:
sliderRect
anchors.
topMargin
:
_margins
/
2
Column
{
anchors.
margins
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
panelLabel
.
bottom
height
:
sliderColumns
.
y
+
sliderColumns
.
height
+
_margins
color
:
palette
.
windowShade
spacing
:
_margins
Column
{
id
:
sliderColumns
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
_margins
Repeater
{
id
:
sliderRepeater
model
:
sliderModel
Repeater
{
id
:
sliderRepeater
model
:
sliderModel
Rectangle
{
id
:
sliderRect
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
sliderColumn
.
y
+
sliderColumn
.
height
+
_margins
color
:
palette
.
windowShade
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
id
:
sliderColumn
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
sliderRect
.
top
property
alias
sliderValue
:
slider
.
value
...
...
@@ -132,11 +133,11 @@ QGCView {
fact
.
value
=
value
}
}
}
}
// Slider
}
// Column
}
// Re
peater
}
//
Column
}
//
Rectangle
}
// Re
ctangle
}
//
Repeater
}
//
Column
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
src/VehicleSetup/SetupView.qml
View file @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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 @
bbdf6dde
...
...
@@ -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
);
...
...
src/comm/PX4MockLink.params
View file @
bbdf6dde
...
...
@@ -282,6 +282,7 @@
1 50 MPC_MANTHR_MIN 0.080 9
1 50 MPC_THR_MAX 1 9
1 50 MPC_THR_MIN 0.1 9
1 50 MPC_THR_HOVER 0.5 9
1 50 MPC_TILTMAX_AIR 45 9
1 50 MPC_TILTMAX_LND 15 9
1 50 MPC_XY_FF 0.5 9
...
...
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