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
96522cf7
Commit
96522cf7
authored
Jun 07, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on real log replay in simulation link
parent
d3b45c52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
MAVLinkProtocol.h
src/comm/MAVLinkProtocol.h
+1
-1
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+20
-0
MAVLinkSimulationLink.h
src/comm/MAVLinkSimulationLink.h
+1
-0
No files found.
src/comm/MAVLinkProtocol.h
View file @
96522cf7
...
...
@@ -69,7 +69,7 @@ public:
/** @brief Get logging state */
bool
loggingEnabled
(
void
);
/** @brief Get the name of the packet log file */
QString
getLogfileName
();
static
QString
getLogfileName
();
public
slots
:
/** @brief Receive bytes from a communication interface */
...
...
src/comm/MAVLinkSimulationLink.cc
View file @
96522cf7
...
...
@@ -38,6 +38,7 @@ This file is part of the PIXHAWK project
#include <QDebug>
#include "MG.h"
#include "LinkManager.h"
#include "MAVLinkProtocol.h"
#include "MAVLinkSimulationLink.h"
// MAVLINK includes
#include <mavlink.h>
...
...
@@ -92,6 +93,10 @@ MAVLinkSimulationLink::MAVLinkSimulationLink(QString readFile, QString writeFile
maxTimeNoise
=
0
;
this
->
id
=
getNextLinkId
();
LinkManager
::
instance
()
->
add
(
this
);
// Open packet log
mavlinkLogFile
=
new
QFile
(
MAVLinkProtocol
::
getLogfileName
());
mavlinkLogFile
->
open
(
QIODevice
::
ReadOnly
);
}
MAVLinkSimulationLink
::~
MAVLinkSimulationLink
()
...
...
@@ -121,6 +126,21 @@ void MAVLinkSimulationLink::run()
if
(
_isConnected
)
{
mainloop
();
// FIXME Hacky code to read from packet log file
// readyBufferMutex.lock();
// for (int i = 0; i < streampointer; i++)
// {
// readyBuffer.enqueue(*(stream + i));
// }
// readyBufferMutex.unlock();
emit
bytesReady
(
this
);
}
last
=
MG
::
TIME
::
getGroundTimeNow
();
...
...
src/comm/MAVLinkSimulationLink.h
View file @
96522cf7
...
...
@@ -98,6 +98,7 @@ protected:
QTimer
*
timer
;
/** File which contains the input data (simulated robot messages) **/
QFile
*
simulationFile
;
QFile
*
mavlinkLogFile
;
QString
simulationHeader
;
/** File where the commands sent by the groundstation are stored **/
QFile
*
receiveFile
;
...
...
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