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
9e76f9f1
Commit
9e76f9f1
authored
Jun 06, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulate RC channels
parent
0cec7741
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
MockLink.cc
src/comm/MockLink.cc
+24
-0
MockLink.h
src/comm/MockLink.h
+1
-0
No files found.
src/comm/MockLink.cc
View file @
9e76f9f1
...
...
@@ -158,6 +158,7 @@ void MockLink::_run1HzTasks(void)
if
(
_mavlinkStarted
&&
_connected
)
{
_sendHeartBeat
();
_sendVibration
();
_sendRCChannels
();
if
(
_sendHomePositionDelayCount
>
0
)
{
// We delay home position a bit to be more realistic
_sendHomePositionDelayCount
--
;
...
...
@@ -1026,3 +1027,26 @@ MockLink* MockLink::startAPMArduPlaneMockLink(bool sendStatusText)
return
_startMockLink
(
mockConfig
);
}
void
MockLink
::
_sendRCChannels
(
void
)
{
mavlink_message_t
msg
;
mavlink_msg_rc_channels_pack
(
_vehicleSystemId
,
_vehicleComponentId
,
&
msg
,
0
,
// time_boot_ms
8
,
// chancount
1500
,
// chan1_raw
1500
,
// chan2_raw
1500
,
// chan3_raw
1500
,
// chan4_raw
1500
,
// chan5_raw
1500
,
// chan6_raw
1500
,
// chan7_raw
1500
,
// chan8_raw
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
0
);
// rssi
respondWithMavlinkMessage
(
msg
);
}
src/comm/MockLink.h
View file @
9e76f9f1
...
...
@@ -173,6 +173,7 @@ private:
void
_sendVibration
(
void
);
void
_sendStatusTextMessages
(
void
);
void
_respondWithAutopilotVersion
(
void
);
void
_sendRCChannels
(
void
);
static
MockLink
*
_startMockLink
(
MockConfiguration
*
mockConfig
);
...
...
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