Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
527d4c48
Commit
527d4c48
authored
Jul 01, 2016
by
Don Gagne
Browse files
Fix button code
parent
77656b0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Joystick/Joystick.cc
View file @
527d4c48
...
...
@@ -122,7 +122,7 @@ void Joystick::_loadSettings(void)
qCDebug
(
JoystickLog
)
<<
"_loadSettings function:axis:badsettings"
<<
function
<<
functionAxis
<<
badSettings
;
}
for
(
int
button
=
0
;
button
<
_
b
uttonCount
;
button
++
)
{
for
(
int
button
=
0
;
button
<
_
totalB
uttonCount
;
button
++
)
{
_rgButtonActions
<<
settings
.
value
(
QString
(
_buttonActionSettingsKey
).
arg
(
button
),
QString
()).
toString
();
qCDebug
(
JoystickLog
)
<<
"_loadSettings button:action"
<<
button
<<
_rgButtonActions
[
button
];
}
...
...
@@ -172,7 +172,7 @@ void Joystick::_saveSettings(void)
qCDebug
(
JoystickLog
)
<<
"_saveSettings name:function:axis"
<<
_name
<<
function
<<
_rgFunctionSettingsKey
[
function
];
}
for
(
int
button
=
0
;
button
<
_
b
uttonCount
;
button
++
)
{
for
(
int
button
=
0
;
button
<
_
totalB
uttonCount
;
button
++
)
{
settings
.
setValue
(
QString
(
_buttonActionSettingsKey
).
arg
(
button
),
_rgButtonActions
[
button
]);
qCDebug
(
JoystickLog
)
<<
"_saveSettings button:action"
<<
button
<<
_rgButtonActions
[
button
];
}
...
...
@@ -471,7 +471,7 @@ QVariantList Joystick::buttonActions(void)
{
QVariantList
list
;
for
(
int
button
=
0
;
button
<
_
b
uttonCount
;
button
++
)
{
for
(
int
button
=
0
;
button
<
_
totalB
uttonCount
;
button
++
)
{
list
+=
QVariant
::
fromValue
(
_rgButtonActions
[
button
]);
}
...
...
src/VehicleSetup/JoystickConfig.qml
View file @
527d4c48
...
...
@@ -465,7 +465,7 @@ QGCView {
Repeater
{
id
:
buttonActionRepeater
model
:
_activeJoystick
.
b
uttonCount
model
:
_activeJoystick
.
totalB
uttonCount
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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