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
05969547
Commit
05969547
authored
Apr 16, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removal of some comments, and fix for JoystickInput not exiting cleanly
parent
a7348f75
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
JoystickInput.cc
src/input/JoystickInput.cc
+12
-3
JoystickInput.h
src/input/JoystickInput.h
+1
-0
MainWindow.cc
src/ui/MainWindow.cc
+2
-0
QGCVehicleConfig.cc
src/ui/QGCVehicleConfig.cc
+2
-2
No files found.
src/input/JoystickInput.cc
View file @
05969547
...
...
@@ -130,7 +130,7 @@ void JoystickInput::init()
int
numJoysticks
=
SDL_NumJoysticks
();
// Wait for joysticks if none is connected
while
(
numJoysticks
==
0
)
while
(
numJoysticks
==
0
&&
!
done
)
{
QGC
::
SLEEP
::
msleep
(
400
);
// INITIALIZE SDL Joystick support
...
...
@@ -140,6 +140,10 @@ void JoystickInput::init()
}
numJoysticks
=
SDL_NumJoysticks
();
}
if
(
done
)
{
return
;
}
printf
(
"%d Input devices found:
\n
"
,
numJoysticks
);
for
(
int
i
=
0
;
i
<
SDL_NumJoysticks
();
i
++
)
...
...
@@ -157,6 +161,10 @@ void JoystickInput::init()
// Make sure active UAS is set
setActiveUAS
(
UASManager
::
instance
()
->
getActiveUAS
());
}
void
JoystickInput
::
shutdown
()
{
done
=
true
;
}
/**
* @brief Execute the Joystick process
...
...
@@ -169,8 +177,9 @@ void JoystickInput::run()
{
if
(
done
)
{
done
=
false
;
exit
();
done
=
false
;
exit
();
return
;
}
while
(
SDL_PollEvent
(
&
event
))
{
...
...
src/input/JoystickInput.h
View file @
05969547
...
...
@@ -55,6 +55,7 @@ public:
JoystickInput
();
~
JoystickInput
();
void
run
();
void
shutdown
();
const
QString
&
getName
();
...
...
src/ui/MainWindow.cc
View file @
05969547
...
...
@@ -276,6 +276,8 @@ MainWindow::~MainWindow()
// }
if
(
joystick
)
{
joystick
->
shutdown
();
joystick
->
wait
(
5000
);
delete
joystick
;
joystick
=
NULL
;
}
...
...
src/ui/QGCVehicleConfig.cc
View file @
05969547
...
...
@@ -843,13 +843,13 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
else
{
bool
found
=
false
;
qDebug
()
<<
"Param with no widget:"
<<
parameterName
;
//
qDebug() << "Param with no widget:" << parameterName;
for
(
int
i
=
0
;
i
<
toolWidgets
.
size
();
i
++
)
{
if
(
parameterName
.
startsWith
(
toolWidgets
[
i
]
->
objectName
()))
{
//It should be grouped with this one.
qDebug
()
<<
parameterName
<<
toolWidgets
[
i
]
->
objectName
();
//
qDebug() << parameterName << toolWidgets[i]->objectName();
toolWidgets
[
i
]
->
addParam
(
uas
,
component
,
parameterName
,
value
);
libParamToWidgetMap
->
insert
(
parameterName
,
toolWidgets
[
i
]);
found
=
true
;
...
...
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