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
1268b945
Commit
1268b945
authored
May 25, 2013
by
Bryant
Browse files
Fixed warning comparing ints of different signed-ness. Everything should just be unsigned here.
parent
46a436ef
Changes
1
Show whitespace changes
Inline
Side-by-side
src/ui/QGCVehicleConfig.cc
View file @
1268b945
...
...
@@ -1058,9 +1058,9 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
minTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
//qDebug() << "PARAM:" << parameterName << "index:" << index;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
if
(
ok
&&
index
<
chanMax
)
{
rcMin
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1068,8 +1068,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
maxTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcMax
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1077,8 +1077,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
trimTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcTrim
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1086,8 +1086,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
revTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcRev
[
index
]
=
(
value
.
toInt
()
==
-
1
)
?
true
:
false
;
updateInvertedCheckboxes
(
index
);
...
...
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