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
f3444099
Unverified
Commit
f3444099
authored
May 01, 2018
by
Don Gagne
Committed by
GitHub
May 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6396 from DonLakeFlyer/Ping
Support PING response
parents
07fba793
71df552d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+20
-0
Vehicle.h
src/Vehicle/Vehicle.h
+1
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
f3444099
...
...
@@ -726,6 +726,9 @@ void Vehicle::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t mes
case
MAVLINK_MSG_ID_DISTANCE_SENSOR
:
_handleDistanceSensor
(
message
);
break
;
case
MAVLINK_MSG_ID_PING
:
_handlePing
(
link
,
message
);
break
;
case
MAVLINK_MSG_ID_SERIAL_CONTROL
:
{
...
...
@@ -1377,6 +1380,23 @@ void Vehicle::_updateArmed(bool armed)
}
}
void
Vehicle
::
_handlePing
(
LinkInterface
*
link
,
mavlink_message_t
&
message
)
{
mavlink_ping_t
ping
;
mavlink_message_t
msg
;
mavlink_msg_ping_decode
(
&
message
,
&
ping
);
mavlink_msg_ping_pack_chan
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
priorityLink
()
->
mavlinkChannel
(),
&
msg
,
ping
.
time_usec
,
ping
.
seq
,
message
.
sysid
,
message
.
compid
);
sendMessageOnLink
(
link
,
msg
);
}
void
Vehicle
::
_handleHeartbeat
(
mavlink_message_t
&
message
)
{
if
(
message
.
compid
!=
_defaultComponentId
)
{
...
...
src/Vehicle/Vehicle.h
View file @
f3444099
...
...
@@ -1010,6 +1010,7 @@ private:
void
_loadSettings
(
void
);
void
_saveSettings
(
void
);
void
_startJoystick
(
bool
start
);
void
_handlePing
(
LinkInterface
*
link
,
mavlink_message_t
&
message
);
void
_handleHomePosition
(
mavlink_message_t
&
message
);
void
_handleHeartbeat
(
mavlink_message_t
&
message
);
void
_handleRadioStatus
(
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