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
fcf77a69
Commit
fcf77a69
authored
Aug 02, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SetupPage as base
This also fixes scrolling
parent
86e636ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
533 additions
and
542 deletions
+533
-542
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+533
-542
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
fcf77a69
...
...
@@ -21,23 +21,30 @@ import QGroundControl.FactSystem 1.0
import
QGroundControl
.
FactControls
1.0
/// Joystick Config
QGCView
{
id
:
rootQGCView
viewPanel
:
panel
SetupPage
{
id
:
joystickPage
pageComponent
:
pageComponent
pageName
:
qsTr
(
"
Joystick
"
)
pageDescription
:
qsTr
(
"
Joystick Setup is used to configure a calibrate joysticks.
"
)
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
Component
{
id
:
pageComponent
Item
{
width
:
availableWidth
height
:
Math
.
max
(
leftColumn
.
height
,
rightColumn
.
height
)
readonly
property
string
dialogTitle
:
qsTr
(
"
Joystick Config
"
)
readonly
property
real
labelToMonitorMargin
:
defaultTextWidth
*
3
property
bool
controllerCompleted
:
false
property
bool
controllerAndViewReady
:
false
readonly
property
real
labelToMonitorMargin
:
defaultTextWidth
*
3
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeJoystick
:
joystickManager
.
activeJoystick
JoystickConfigController
{
id
:
controller
factPanel
:
p
anel
factPanel
:
joystickPage
.
viewP
anel
statusText
:
statusText
cancelButton
:
cancelButton
nextButton
:
nextButton
...
...
@@ -45,24 +52,20 @@ QGCView {
Component.onCompleted
:
{
controllerCompleted
=
true
if
(
rootQGCView
.
completedSignalled
)
{
if
(
joystickPage
.
completedSignalled
)
{
controllerAndViewReady
=
true
controller
.
start
()
}
}
}
onCompleted
:
{
Component
.
onCompleted
:
{
if
(
controllerCompleted
)
{
controllerAndViewReady
=
true
controller
.
start
()
}
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
// Live axis monitor control component
Component
{
id
:
axisMonitorDisplayComponent
...
...
@@ -123,36 +126,22 @@ QGCView {
duration
:
1500
}
/*
/*
// Axis value debugger
QGCLabel {
anchors.fill: parent
text: axisValue
}
*/
*/
}
}
// Component - axisMonitorDisplayComponent
// Main view Qml starts here
QGCLabel
{
id
:
header
font.pointSize
:
ScreenTools
.
mediumFontPointSize
text
:
qsTr
(
"
JOYSTICK
"
)
}
Item
{
id
:
spacer
anchors.top
:
header
.
bottom
width
:
parent
.
width
height
:
10
}
// Left side column
Column
{
id
:
leftColumn
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.top
:
spacer
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
rightColumn
.
left
spacing
:
10
...
...
@@ -178,11 +167,11 @@ QGCView {
id
:
rollLoader
anchors.left
:
rollLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGCView
.
defaultText
Height
height
:
ScreenTools
.
defaultFontPixel
Height
width
:
100
sourceComponent
:
axisMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGCView
.
defaultText
Width
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixel
Width
property
bool
mapped
:
controller
.
rollAxisMapped
property
bool
reversed
:
controller
.
rollAxisReversed
}
...
...
@@ -208,11 +197,11 @@ QGCView {
id
:
pitchLoader
anchors.left
:
pitchLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGCView
.
defaultText
Height
height
:
ScreenTools
.
defaultFontPixel
Height
width
:
100
sourceComponent
:
axisMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGCView
.
defaultText
Width
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixel
Width
property
bool
mapped
:
controller
.
pitchAxisMapped
property
bool
reversed
:
controller
.
pitchAxisReversed
}
...
...
@@ -238,11 +227,11 @@ QGCView {
id
:
yawLoader
anchors.left
:
yawLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGCView
.
defaultText
Height
height
:
ScreenTools
.
defaultFontPixel
Height
width
:
100
sourceComponent
:
axisMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGCView
.
defaultText
Width
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixel
Width
property
bool
mapped
:
controller
.
yawAxisMapped
property
bool
reversed
:
controller
.
yawAxisReversed
}
...
...
@@ -268,11 +257,11 @@ QGCView {
id
:
throttleLoader
anchors.left
:
throttleLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGCView
.
defaultText
Height
height
:
ScreenTools
.
defaultFontPixel
Height
width
:
100
sourceComponent
:
axisMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGCView
.
defaultText
Width
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixel
Width
property
bool
mapped
:
controller
.
throttleAxisMapped
property
bool
reversed
:
controller
.
throttleAxisReversed
}
...
...
@@ -647,11 +636,11 @@ QGCView {
Loader
{
id
:
theLoader
anchors.verticalCenter
:
axisLabel
.
verticalCenter
height
:
rootQGCView
.
defaultText
Height
height
:
ScreenTools
.
defaultFontPixel
Height
width
:
200
sourceComponent
:
axisMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGCView
.
defaultText
Width
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixel
Width
property
bool
mapped
:
true
readonly
property
bool
reversed
:
false
}
...
...
@@ -676,7 +665,8 @@ QGCView {
}
}
Row
{
Flow
{
width
:
parent
.
width
spacing
:
-
1
Repeater
{
...
...
@@ -704,5 +694,6 @@ QGCView {
}
// Row
}
// Column - Axis Monitor
}
// Column - Right Column
}
// QGCViewPanel
}
}
// Item
}
// Component - pageComponent
}
// SetupPage
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