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
14b8979b
Commit
14b8979b
authored
5 years ago
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
0378568d
master
dev1
merge_branch_alt
original
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
23 deletions
+35
-23
PIDTuning.qml
src/QmlControls/PIDTuning.qml
+35
-23
No files found.
src/QmlControls/PIDTuning.qml
View file @
14b8979b
...
...
@@ -142,9 +142,17 @@ RowLayout {
}
Component.onCompleted
:
{
// Stop deferring updates to vehicle values. We need them as fast as we can for charting.
_activeVehicle
.
setLiveUpdates
(
true
)
_activeVehicle
.
setpoint
.
setLiveUpdates
(
true
)
saveTuningParamValues
()
}
Component.onDestruction
:
{
_activeVehicle
.
setLiveUpdates
(
false
)
_activeVehicle
.
setpoint
.
setLiveUpdates
(
true
)
}
on_CurrentTuneTypeChanged
:
{
saveTuningParamValues
()
resetGraphs
()
...
...
@@ -159,7 +167,8 @@ RowLayout {
min
:
0
max
:
0
labelFormat
:
"
%d
"
titleText
:
"
sec
"
titleText
:
"
msec
"
tickCount
:
11
}
ValueAxis
{
...
...
@@ -167,7 +176,8 @@ RowLayout {
min
:
0
max
:
0
labelFormat
:
"
%d
"
titleText
:
"
sec
"
titleText
:
"
msec
"
tickCount
:
11
}
ValueAxis
{
...
...
@@ -192,41 +202,37 @@ RowLayout {
running
:
false
repeat
:
true
function
startOrStop
()
{
if
(
dataTimer
.
running
)
{
dataTimer
.
stop
()
}
else
{
dataTimer
.
start
()
}
}
onTriggered
:
{
var
seconds
=
_msecs
/
1000
_valueXAxis
.
max
=
seconds
_valueRateXAxis
.
max
=
seconds
_valueXAxis
.
max
=
_msecs
_valueRateXAxis
.
max
=
_msecs
getValues
()
valueSeries
.
append
(
second
s
,
_value
)
valueSeries
.
append
(
_msec
s
,
_value
)
adjustYAxisMin
(
_valueYAxis
,
_value
)
adjustYAxisMax
(
_valueYAxis
,
_value
)
valueSetpointSeries
.
append
(
second
s
,
_valueSetpoint
)
valueSetpointSeries
.
append
(
_msec
s
,
_valueSetpoint
)
adjustYAxisMin
(
_valueYAxis
,
_valueSetpoint
)
adjustYAxisMax
(
_valueYAxis
,
_valueSetpoint
)
valueRateSeries
.
append
(
second
s
,
_valueRate
)
valueRateSeries
.
append
(
_msec
s
,
_valueRate
)
adjustYAxisMin
(
_valueRateYAxis
,
_valueRate
)
adjustYAxisMax
(
_valueRateYAxis
,
_valueRate
)
valueRateSetpointSeries
.
append
(
second
s
,
_valueRateSetpoint
)
valueRateSetpointSeries
.
append
(
_msec
s
,
_valueRateSetpoint
)
adjustYAxisMin
(
_valueRateYAxis
,
_valueRateSetpoint
)
adjustYAxisMax
(
_valueRateYAxis
,
_valueRateSetpoint
)
_msecs
+=
interval
/*
Testing with just start/stop for now. No time limit.
if (valueSeries.count > _maxPointCount) {
valueSeries.remove(0)
valueSetpointSeries.remove(0)
valueRateSeries.remove(0)
valueRateSetpointSeries.remove(0)
valueXAxis.min = valueSeries.at(0).x
valueRateXAxis.min = valueSeries.at(0).x
}
*/
}
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
...
...
@@ -279,7 +285,10 @@ RowLayout {
text
:
"
-
"
onClicked
:
{
var
value
=
modelData
.
value
modelData
.
value
-=
value
*
adjustPercentModel
.
get
(
adjustPercentCombo
.
currentIndex
).
value
var
newValue
=
value
-
(
value
*
adjustPercentModel
.
get
(
adjustPercentCombo
.
currentIndex
).
value
)
if
(
newValue
>=
modelData
.
min
)
{
modelData
.
value
=
newValue
}
}
}
}
...
...
@@ -301,7 +310,10 @@ RowLayout {
text
:
"
+
"
onClicked
:
{
var
value
=
modelData
.
value
modelData
.
value
+=
value
*
adjustPercentModel
.
get
(
adjustPercentCombo
.
currentIndex
).
value
var
newValue
=
value
+
(
value
*
adjustPercentModel
.
get
(
adjustPercentCombo
.
currentIndex
).
value
)
if
(
newValue
<=
modelData
.
max
)
{
modelData
.
value
=
newValue
}
}
}
}
...
...
@@ -372,7 +384,7 @@ RowLayout {
QGCButton
{
text
:
dataTimer
.
running
?
qsTr
(
"
Stop
"
)
:
qsTr
(
"
Start
"
)
onClicked
:
dataTimer
.
running
=
!
dataTimer
.
running
onClicked
:
dataTimer
.
startOrStop
()
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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