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
c4b58dd5
Commit
c4b58dd5
authored
Jul 18, 2019
by
Gus Grubba
Browse files
Fix compiler warnings
parent
3100b059
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Joystick/Joystick.cc
View file @
c4b58dd5
...
...
@@ -80,9 +80,9 @@ Joystick::Joystick(const QString& name, int axisCount, int buttonCount, int hatC
,
_totalButtonCount
(
_buttonCount
+
_hatButtonCount
)
,
_multiVehicleManager
(
multiVehicleManager
)
{
_rgAxisValues
=
new
int
[
_axisCount
];
_rgCalibration
=
new
Calibration_t
[
_axisCount
];
_rgButtonValues
=
new
uint8_t
[
_totalButtonCount
];
_rgAxisValues
=
new
int
[
static_cast
<
size_t
>
(
_axisCount
)
];
_rgCalibration
=
new
Calibration_t
[
static_cast
<
size_t
>
(
_axisCount
)
];
_rgButtonValues
=
new
uint8_t
[
static_cast
<
size_t
>
(
_totalButtonCount
)
];
for
(
int
i
=
0
;
i
<
_axisCount
;
i
++
)
{
_rgAxisValues
[
i
]
=
0
;
...
...
@@ -538,7 +538,7 @@ void Joystick::run()
// Set up button bitmap
quint64
buttonPressedBits
=
0
;
// Buttons pressed for manualControl signal
for
(
int
buttonIndex
=
0
;
buttonIndex
<
_totalButtonCount
;
buttonIndex
++
)
{
quint64
buttonBit
=
static_cast
<
quint64
>
(
1
<<
buttonIndex
);
quint64
buttonBit
=
static_cast
<
quint64
>
(
1
LL
<<
buttonIndex
);
if
(
_rgButtonValues
[
buttonIndex
]
!=
BUTTON_UP
)
{
// Mark the button as pressed as long as its pressed
buttonPressedBits
|=
buttonBit
;
...
...
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