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
d562a023
Commit
d562a023
authored
Oct 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix signalling
parent
95cec0e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
Vehicle.cc
src/Vehicle/Vehicle.cc
+22
-7
No files found.
src/Vehicle/Vehicle.cc
View file @
d562a023
...
...
@@ -202,17 +202,32 @@ void Vehicle::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t mes
void
Vehicle
::
_handleHomePosition
(
mavlink_message_t
&
message
)
{
bool
emitHomePositionChanged
=
false
;
bool
emitHomePositionAvailableChanged
=
false
;
mavlink_home_position_t
homePos
;
mavlink_msg_home_position_decode
(
&
message
,
&
homePos
);
_homePosition
.
setLatitude
(
homePos
.
latitude
/
10000000.0
);
_homePosition
.
setLongitude
(
homePos
.
longitude
/
10000000.0
);
_homePosition
.
setAltitude
(
homePos
.
altitude
/
1000.0
);
QGeoCoordinate
newHomePosition
(
homePos
.
latitude
/
10000000.0
,
homePos
.
longitude
/
10000000.0
,
homePos
.
altitude
/
1000.0
);
if
(
newHomePosition
!=
_homePosition
)
{
emitHomePositionChanged
=
true
;
_homePosition
=
newHomePosition
;
}
if
(
!
_homePositionAvailable
)
{
emitHomePositionAvailableChanged
=
true
;
}
_homePositionAvailable
=
true
;
emit
homePositionChanged
(
_homePosition
);
emit
homePositionAvailableChanged
(
true
);
if
(
emitHomePositionChanged
)
{
emit
homePositionChanged
(
_homePosition
);
}
if
(
emitHomePositionAvailableChanged
)
{
emit
homePositionAvailableChanged
(
true
);
}
}
void
Vehicle
::
_handleHeartbeat
(
mavlink_message_t
&
message
)
...
...
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