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
53c833a0
Commit
53c833a0
authored
Feb 24, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send VIBRATION message
parent
17fee7a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
MockLink.cc
src/comm/MockLink.cc
+19
-0
MockLink.h
src/comm/MockLink.h
+1
-0
No files found.
src/comm/MockLink.cc
View file @
53c833a0
...
...
@@ -174,6 +174,7 @@ void MockLink::_run1HzTasks(void)
{
if
(
_mavlinkStarted
&&
_connected
)
{
_sendHeartBeat
();
_sendVibration
();
if
(
_sendHomePositionDelayCount
>
0
)
{
// We delay home position a bit to be more realistic
_sendHomePositionDelayCount
--
;
...
...
@@ -288,6 +289,24 @@ void MockLink::_sendHeartBeat(void)
respondWithMavlinkMessage
(
msg
);
}
void
MockLink
::
_sendVibration
(
void
)
{
mavlink_message_t
msg
;
mavlink_msg_vibration_pack
(
_vehicleSystemId
,
_vehicleComponentId
,
&
msg
,
0
,
// time_usec
50.5
,
// vibration_x,
10.5
,
// vibration_y,
60.0
,
// vibration_z,
1
,
// clipping_0
2
,
// clipping_0
3
);
// clipping_0
respondWithMavlinkMessage
(
msg
);
}
void
MockLink
::
respondWithMavlinkMessage
(
const
mavlink_message_t
&
msg
)
{
uint8_t
buffer
[
MAVLINK_MAX_PACKET_LEN
];
...
...
src/comm/MockLink.h
View file @
53c833a0
...
...
@@ -192,6 +192,7 @@ private:
void
_setParamFloatUnionIntoMap
(
int
componentId
,
const
QString
&
paramName
,
float
paramFloat
);
void
_sendHomePosition
(
void
);
void
_sendGpsRawInt
(
void
);
void
_sendVibration
(
void
);
void
_sendStatusTextMessages
(
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