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
4bdae512
Commit
4bdae512
authored
Oct 14, 2016
by
Gregory Dymarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync with upstream
parent
6bc6ce05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
JoystickAndroid.cc
src/Joystick/JoystickAndroid.cc
+12
-6
JoystickAndroid.h
src/Joystick/JoystickAndroid.h
+6
-5
No files found.
src/Joystick/JoystickAndroid.cc
View file @
4bdae512
...
...
@@ -11,7 +11,7 @@ int JoystickAndroid::ACTION_UP;
QMutex
JoystickAndroid
::
m_mutex
;
JoystickAndroid
::
JoystickAndroid
(
const
QString
&
name
,
int
axisCount
,
int
buttonCount
,
int
id
,
MultiVehicleManager
*
multiVehicleManager
)
:
Joystick
(
name
,
axisCount
,
buttonCount
,
multiVehicleManager
)
:
Joystick
(
name
,
axisCount
,
buttonCount
,
0
,
multiVehicleManager
)
,
deviceId
(
id
)
{
int
i
;
...
...
@@ -159,26 +159,32 @@ bool JoystickAndroid::handleGenericMotionEvent(jobject event) {
}
bool
JoystickAndroid
::
open
(
void
)
{
bool
JoystickAndroid
::
_
open
(
void
)
{
return
true
;
}
void
JoystickAndroid
::
close
(
void
)
{
void
JoystickAndroid
::
_
close
(
void
)
{
}
bool
JoystickAndroid
::
update
(
void
)
bool
JoystickAndroid
::
_
update
(
void
)
{
return
true
;
}
bool
JoystickAndroid
::
getButton
(
int
i
)
{
bool
JoystickAndroid
::
_
getButton
(
int
i
)
{
return
btnValue
[
i
];
}
int
JoystickAndroid
::
getAxis
(
int
i
)
{
int
JoystickAndroid
::
_
getAxis
(
int
i
)
{
return
axisValue
[
i
];
}
uint8_t
JoystickAndroid
::
_getHat
(
int
hat
,
int
i
)
{
Q_UNUSED
(
hat
);
Q_UNUSED
(
i
);
return
0
;
}
//helper method
void
JoystickAndroid
::
_initStatic
()
{
...
...
src/Joystick/JoystickAndroid.h
View file @
4bdae512
...
...
@@ -24,12 +24,13 @@ private:
bool
handleKeyEvent
(
jobject
event
);
bool
handleGenericMotionEvent
(
jobject
event
);
virtual
bool
open
();
virtual
void
close
();
virtual
bool
update
();
virtual
bool
_
open
();
virtual
void
_
close
();
virtual
bool
_
update
();
virtual
bool
getButton
(
int
i
);
virtual
int
getAxis
(
int
i
);
virtual
bool
_getButton
(
int
i
);
virtual
int
_getAxis
(
int
i
);
virtual
uint8_t
_getHat
(
int
hat
,
int
i
);
int
*
btnCode
;
int
*
axisCode
;
...
...
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