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
d304cb11
Commit
d304cb11
authored
8 years ago
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support both THR_MID and MOT_THST_HOVER
parent
d90e7aa0
master
dev1
merge_branch_alt
original
phil
rc1
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
APMTuningComponentCopter.qml
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
+19
-13
No files found.
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
View file @
d304cb11
...
...
@@ -26,7 +26,13 @@ QGCView {
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
property
Fact
_throttleMid
:
controller
.
getParameterFact
(
-
1
,
"
THR_MID
"
)
// Older firmwares use THR_MODE, newer use MOT_THST_HOVER
property
bool
_throttleMidExists
:
controller
.
parameterExists
(
-
1
,
"
THR_MID
"
)
property
Fact
_hoverTuneParam
:
controller
.
getParameterFact
(
-
1
,
_throttleMidExists
?
"
THR_MID
"
:
"
MOT_THST_HOVER
"
)
property
real
_hoverTuneMin
:
_throttleMidExists
?
200
:
0
property
real
_hoverTuneMax
:
_throttleMidExists
?
800
:
1
property
real
_hoverTuneStep
:
_throttleMidExists
?
10
:
0.01
property
Fact
_rcFeel
:
controller
.
getParameterFact
(
-
1
,
"
RC_FEEL_RP
"
)
property
Fact
_rateRollP
:
controller
.
getParameterFact
(
-
1
,
"
r.ATC_RAT_RLL_P
"
)
property
Fact
_rateRollI
:
controller
.
getParameterFact
(
-
1
,
"
r.ATC_RAT_RLL_I
"
)
...
...
@@ -63,7 +69,7 @@ QGCView {
// handler which updates your property with the new value, this first value change will trash
// your bound values. In order to work around this we don't set the values into the Sliders until
// after Qml load is done. We also don't track value changes until Qml load completes.
throttleHover
.
value
=
_
throttleMid
.
value
throttleHover
.
value
=
_
hoverTuneParam
.
value
rollPitch
.
value
=
_rateRollP
.
value
climb
.
value
=
_rateClimbP
.
value
rcFeel
.
value
=
_rcFeel
.
value
...
...
@@ -159,14 +165,14 @@ QGCView {
id
:
throttleHover
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
minimumValue
:
200
maximumValue
:
800
stepSize
:
10.0
minimumValue
:
_hoverTuneMin
maximumValue
:
_hoverTuneMax
stepSize
:
_hoverTuneStep
tickmarksEnabled
:
true
onValueChanged
:
{
if
(
_loadComplete
)
{
_
throttleMid
.
value
=
value
_
hoverTuneParam
.
value
=
value
}
}
}
...
...
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