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
47b1c7e7
Commit
47b1c7e7
authored
Jul 08, 2016
by
Don Gagne
Committed by
GitHub
Jul 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3703 from Rudi3/ch6_tune
[APM] [Copter] Ch6 tune
parents
627025d8
f1796a5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
128 additions
and
43 deletions
+128
-43
APMTuningComponentCopter.qml
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
+128
-43
No files found.
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
View file @
47b1c7e7
...
...
@@ -275,63 +275,148 @@ QGCView {
}
}
// Rectangle - Basic tuning
QGCLabel
{
id
:
autoTuneLabel
anchors.topMargin
:
_margins
Flow
{
id
:
flowLayout
anchors.topMargin
:
_margins
/
2
width
:
panel
.
width
// parent.width doesn't work here for some reason!
anchors.top
:
basicTuningRect
.
bottom
text
:
qsTr
(
"
AutoTune
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
spacing
:
_margins
Rectangle
{
id
:
autoTuneRect
anchors.topMargin
:
_margins
/
2
anchors.left
:
parent
.
left
anchors.top
:
autoTuneLabel
.
bottom
width
:
autoTuneColumn
.
x
+
autoTuneColumn
.
width
+
_margins
height
:
autoTuneColumn
.
y
+
autoTuneColumn
.
height
+
_margins
color
:
palette
.
windowShade
Rectangle
{
height
:
autoTuneLabel
.
height
+
autoTuneRect
.
height
width
:
autoTuneRect
.
width
color
:
palette
.
window
Column
{
id
:
autoTuneColumn
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
_margins
QGCLabel
{
id
:
autoTuneLabel
text
:
qsTr
(
"
AutoTune
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Row
{
spacing
:
_margins
Rectangle
{
id
:
autoTuneRect
width
:
autoTuneColumn
.
x
+
autoTuneColumn
.
width
+
_margins
height
:
autoTuneColumn
.
y
+
autoTuneColumn
.
height
+
_margins
anchors.top
:
autoTuneLabel
.
bottom
color
:
palette
.
windowShade
QGCLabel
{
text
:
qsTr
(
"
Axes to AutoTune:
"
)
}
FactBitmask
{
fact
:
_autoTuneAxes
}
}
Column
{
id
:
autoTuneColumn
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
_margins
Row
{
spacing
:
_margins
Row
{
spacing
:
_margins
QGCLabel
{
anchors.baseline
:
autoTuneChannelCombo
.
baseline
text
:
qsTr
(
"
Channel for AutoTune switch:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Axes to AutoTune:
"
)
}
FactBitmask
{
fact
:
_autoTuneAxes
}
}
Row
{
spacing
:
_margins
QGCLabel
{
anchors.baseline
:
autoTuneChannelCombo
.
baseline
text
:
qsTr
(
"
Channel for AutoTune switch:
"
)
}
QGCComboBox
{
id
:
autoTuneChannelCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
14
model
:
[
qsTr
(
"
None
"
),
qsTr
(
"
Channel 7
"
),
qsTr
(
"
Channel 8
"
),
qsTr
(
"
Channel 9
"
),
qsTr
(
"
Channel 10
"
),
qsTr
(
"
Channel 11
"
),
qsTr
(
"
Channel 12
"
)
]
currentIndex
:
_autoTuneSwitchChannelIndex
QGCComboBox
{
id
:
autoTuneChannelCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
14
model
:
[
qsTr
(
"
None
"
),
qsTr
(
"
Channel 7
"
),
qsTr
(
"
Channel 8
"
),
qsTr
(
"
Channel 9
"
),
qsTr
(
"
Channel 10
"
),
qsTr
(
"
Channel 11
"
),
qsTr
(
"
Channel 12
"
)
]
currentIndex
:
_autoTuneSwitchChannelIndex
onActivated
:
{
var
channel
=
index
onActivated
:
{
var
channel
=
index
if
(
channel
>
0
)
{
channel
+=
6
if
(
channel
>
0
)
{
channel
+=
6
}
setChannelAutoTuneOption
(
channel
)
}
}
setChannelAutoTuneOption
(
channel
)
}
}
}
// Rectangle - AutoTune
}
// Rectangle - AutoTuneWrap
Rectangle
{
height
:
inFlightTuneLabel
.
height
+
channel6TuningOption
.
height
width
:
channel6TuningOption
.
width
color
:
palette
.
window
QGCLabel
{
id
:
inFlightTuneLabel
text
:
qsTr
(
"
In Flight Tuning
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
}
}
// Rectangle - AutoTune
Rectangle
{
id
:
channel6TuningOption
width
:
channel6TuningOptColumn
.
width
+
(
_margins
*
2
)
height
:
channel6TuningOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
inFlightTuneLabel
.
bottom
color
:
qgcPal
.
windowShade
Column
{
id
:
channel6TuningOptColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
Fact
nullFact
:
Fact
{
}
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
qsTr
(
"
Channel Option 6 (Tuning):
"
)
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text
}
FactComboBox
{
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
TUNE
"
)
indexModel
:
false
}
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
Fact
nullFact
:
Fact
{
}
QGCLabel
{
anchors.baseline
:
tuneMinField
.
baseline
text
:
qsTr
(
"
Min:
"
)
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text
}
FactTextField
{
id
:
tuneMinField
validator
:
DoubleValidator
{
bottom
:
0
;
top
:
32767
;}
fact
:
controller
.
getParameterFact
(
-
1
,
"
TUNE_LOW
"
)
}
QGCLabel
{
anchors.baseline
:
tuneMaxField
.
baseline
text
:
qsTr
(
"
Max:
"
)
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text
}
FactTextField
{
id
:
tuneMaxField
validator
:
DoubleValidator
{
bottom
:
0
;
top
:
32767
;}
fact
:
controller
.
getParameterFact
(
-
1
,
"
TUNE_HIGH
"
)
}
}
}
// Column - Channel 6 Tuning option
}
// Rectangle - Channel 6 Tuning options
}
// Rectangle - Channel 6 Tuning options wrap
}
// Flow - Tune
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
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