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
4165c09f
Commit
4165c09f
authored
Sep 29, 2016
by
Beat Küng
Browse files
px4firmwareplugin: fix minimum required version comparison
before, with a version of eg. 1.5.0, the user was wrongly notified.
parent
d24e93d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
4165c09f
...
...
@@ -459,7 +459,15 @@ void PX4FirmwarePlugin::_handleAutopilotVersion(Vehicle* vehicle, mavlink_messag
minorVersion
=
(
version
.
flight_sw_version
>>
(
8
*
2
))
&
0xFF
;
patchVersion
=
(
version
.
flight_sw_version
>>
(
8
*
1
))
&
0xFF
;
notifyUser
=
majorVersion
<
supportedMajorVersion
||
minorVersion
<
supportedMinorVersion
||
patchVersion
<
supportedPatchVersion
;
if
(
majorVersion
<
supportedMajorVersion
)
{
notifyUser
=
true
;
}
else
if
(
majorVersion
==
supportedMajorVersion
)
{
if
(
minorVersion
<
supportedMinorVersion
)
{
notifyUser
=
true
;
}
else
if
(
minorVersion
==
supportedMinorVersion
)
{
notifyUser
=
patchVersion
<
supportedPatchVersion
;
}
}
}
else
{
notifyUser
=
true
;
}
...
...
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