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
d96940f7
Commit
d96940f7
authored
Jul 27, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add joystick button function mapper for ArduSub
parent
571e7fb1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
1 deletion
+70
-1
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+70
-1
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
d96940f7
...
...
@@ -18,6 +18,7 @@ import QGroundControl.Controls 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
/// Joystick Config
QGCView
{
...
...
@@ -448,6 +449,9 @@ QGCView {
if
(
buttonActionRepeater
.
itemAt
(
index
))
{
buttonActionRepeater
.
itemAt
(
index
).
pressed
=
pressed
}
if
(
subButtonActionRepeater
.
itemAt
(
index
))
{
subButtonActionRepeater
.
itemAt
(
index
).
pressed
=
pressed
}
}
}
...
...
@@ -470,7 +474,7 @@ QGCView {
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_activeVehicle
.
manualControlReservedButtonCount
==
-
1
?
false
:
modelData
>=
_activeVehicle
.
manualControlReservedButtonCount
visible
:
(
_activeVehicle
.
manualControlReservedButtonCount
==
-
1
?
false
:
modelData
>=
_activeVehicle
.
manualControlReservedButtonCount
)
&&
!
_activeVehicle
.
sub
property
bool
pressed
...
...
@@ -509,6 +513,71 @@ QGCView {
}
}
}
// Repeater
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_activeVehicle
.
sub
QGCLabel
{
horizontalAlignment
:
Text
.
AlignHCenter
width
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
text
:
qsTr
(
"
#
"
)
}
QGCLabel
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
text
:
qsTr
(
"
Function:
"
)
}
QGCLabel
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
text
:
qsTr
(
"
Shift Function:
"
)
}
}
// Row
Repeater
{
id
:
subButtonActionRepeater
model
:
_activeJoystick
.
totalButtonCount
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_activeVehicle
.
sub
property
bool
pressed
Rectangle
{
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
height
:
width
border.width
:
1
border.color
:
qgcPal
.
text
color
:
pressed
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
QGCLabel
{
anchors.fill
:
parent
color
:
pressed
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
modelData
}
}
FactComboBox
{
id
:
mainSubButtonActionCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
parameterExists
(
-
1
,
"
BTN
"
+
index
+
"
_FUNCTION
"
)
?
controller
.
getParameterFact
(
-
1
,
"
BTN
"
+
index
+
"
_FUNCTION
"
)
:
null
;
indexModel
:
false
}
FactComboBox
{
id
:
shiftSubButtonActionCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
parameterExists
(
-
1
,
"
BTN
"
+
index
+
"
_SFUNCTION
"
)
?
controller
.
getParameterFact
(
-
1
,
"
BTN
"
+
index
+
"
_SFUNCTION
"
)
:
null
;
indexModel
:
false
}
}
// Row
}
// Repeater
}
// Column
}
// Column - right setting column
}
// Row - Settings
...
...
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