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
3363879c
Commit
3363879c
authored
Jan 19, 2017
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Defer joystick probe until after MainWindow is created
parent
9570aecc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
JoystickManager.cc
src/Joystick/JoystickManager.cc
+3
-0
JoystickManager.h
src/Joystick/JoystickManager.h
+3
-0
QGCApplication.cc
src/QGCApplication.cc
+3
-0
No files found.
src/Joystick/JoystickManager.cc
View file @
3363879c
...
...
@@ -53,7 +53,10 @@ void JoystickManager::setToolbox(QGCToolbox *toolbox)
_multiVehicleManager
=
_toolbox
->
multiVehicleManager
();
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
void
JoystickManager
::
discoverJoysticks
()
{
#ifdef __sdljoystick__
_name2JoystickMap
=
JoystickSDL
::
discover
(
_multiVehicleManager
);
#elif defined(__android__)
...
...
src/Joystick/JoystickManager.h
View file @
3363879c
...
...
@@ -48,6 +48,9 @@ public:
// Override from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
public
slots
:
void
discoverJoysticks
();
signals:
void
activeJoystickChanged
(
Joystick
*
joystick
);
void
activeJoystickNameChanged
(
const
QString
&
name
);
...
...
src/QGCApplication.cc
View file @
3363879c
...
...
@@ -429,6 +429,9 @@ bool QGCApplication::_initForNormalAppBoot(void)
// Load known link configurations
toolbox
()
->
linkManager
()
->
loadLinkConfigurationList
();
// Probe for joysticks - TODO: manage on a timer or use events to deal with hotplug
toolbox
()
->
joystickManager
()
->
discoverJoysticks
();
if
(
_settingsUpgraded
)
{
settings
.
clear
();
settings
.
setValue
(
_settingsVersionKey
,
QGC_SETTINGS_VERSION
);
...
...
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