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
b025bec9
Commit
b025bec9
authored
May 02, 2016
by
Gregory Dymarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing syntax
parent
3987ea37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
Joystick.cc
src/Joystick/Joystick.cc
+1
-1
JoystickAndroid.cc
src/Joystick/JoystickAndroid.cc
+1
-0
JoystickSDL.h
src/Joystick/JoystickSDL.h
+34
-0
No files found.
src/Joystick/Joystick.cc
View file @
b025bec9
...
...
@@ -44,7 +44,7 @@ const char* Joystick::_rgFunctionSettingsKey[Joystick::maxFunction] = {
};
Joystick
::
Joystick
(
const
QString
&
name
,
int
axisCount
,
int
buttonCount
,
MultiVehicleManager
*
multiVehicleManager
)
,
_exitThread
(
false
)
:
_exitThread
(
false
)
,
_name
(
name
)
,
_axisCount
(
axisCount
)
,
_buttonCount
(
buttonCount
)
...
...
src/Joystick/JoystickAndroid.cc
View file @
b025bec9
...
...
@@ -139,6 +139,7 @@ bool JoystickAndroid::handleKeyEvent(jobject event) {
if
(
btnCode
[
i
]
==
keyCode
)
{
if
(
action
==
ACTION_DOWN
)
btnValue
[
i
]
=
true
;
if
(
action
==
ACTION_UP
)
btnValue
[
i
]
=
false
;
qWarning
()
<<
"Btn:"
<<
i
;
return
true
;
}
}
...
...
src/Joystick/JoystickSDL.h
0 → 100644
View file @
b025bec9
#ifndef JOYSTICKSDL_H
#define JOYSTICKSDL_H
#include "Joystick.h"
#include "Vehicle.h"
#include "MultiVehicleManager.h"
#ifdef Q_OS_MAC
#include <SDL.h>
#else
#include <SDL/SDL.h>
#endif
class
JoystickSDL
:
public
Joystick
{
public:
JoystickSDL
(
const
QString
&
name
,
int
axisCount
,
int
buttonCount
,
int
index
,
MultiVehicleManager
*
multiVehicleManager
);
static
QMap
<
QString
,
Joystick
*>
discover
(
MultiVehicleManager
*
_multiVehicleManager
);
private:
virtual
bool
open
();
virtual
void
close
();
virtual
bool
update
();
virtual
bool
getButton
(
int
i
);
virtual
int
getAxis
(
int
i
);
SDL_Joystick
*
sdlJoystick
;
int
_index
;
///< Index for SDL_JoystickOpen
};
#endif // JOYSTICKSDL_H
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