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
28ebe38a
Commit
28ebe38a
authored
Jul 02, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cherry pick live scrubbing from master
parent
14d0b71a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
LogReplayLink.cc
src/comm/LogReplayLink.cc
+15
-4
LogReplayLink.h
src/comm/LogReplayLink.h
+1
-0
QGCMAVLinkLogPlayer.cc
src/ui/QGCMAVLinkLogPlayer.cc
+0
-2
QGCMAVLinkLogPlayer.ui
src/ui/QGCMAVLinkLogPlayer.ui
+1
-1
No files found.
src/comm/LogReplayLink.cc
View file @
28ebe38a
...
...
@@ -14,6 +14,7 @@
#include <QFileInfo>
#include <QtEndian>
#include <QSignalSpy>
const
char
*
LogReplayLinkConfiguration
::
_logFilenameKey
=
"logFilename"
;
...
...
@@ -378,7 +379,7 @@ void LogReplayLink::_readNextLogEntry(void)
timeToNextExecutionMSecs
=
desiredPacedTimeMSecs
-
currentTimeMSecs
;
}
emit
currentLogTimeSecs
((
_logCurrentTimeUSecs
-
_logStartTimeUSecs
)
/
1000000
);
_signalCurrentLogTimeSecs
(
);
// And schedule the next execution of this function.
_readTickTimer
.
start
(
timeToNextExecutionMSecs
);
...
...
@@ -460,9 +461,13 @@ void LogReplayLink::_resetPlaybackToBeginning(void)
void
LogReplayLink
::
movePlayhead
(
int
percentComplete
)
{
if
(
isPlaying
())
{
qWarning
()
<<
"Should not move playhead while playing, pause first"
;
_pauseOnThread
();
QSignalSpy
waitForPause
(
this
,
SIGNAL
(
playbackPaused
));
waitForPause
.
wait
();
if
(
_readTickTimer
.
isActive
())
{
return
;
}
}
if
(
percentComplete
<
0
||
percentComplete
>
100
)
{
qWarning
()
<<
"Bad percentage value"
<<
percentComplete
;
...
...
@@ -505,6 +510,7 @@ void LogReplayLink::movePlayhead(int percentComplete)
// And scan until we reach the start of a MAVLink message. We make sure to record this timestamp for
// smooth jumping around the file.
_logCurrentTimeUSecs
=
_seekToNextMavlinkMessage
(
&
dummy
);
_signalCurrentLogTimeSecs
();
// Now update the UI with our actual final position.
newRelativeTimeUSecs
=
(
float
)(
_logCurrentTimeUSecs
-
_logStartTimeUSecs
);
...
...
@@ -571,3 +577,8 @@ void LogReplayLink::_playbackError(void)
_logFile
.
close
();
emit
playbackError
();
}
void
LogReplayLink
::
_signalCurrentLogTimeSecs
(
void
)
{
emit
currentLogTimeSecs
((
_logCurrentTimeUSecs
-
_logStartTimeUSecs
)
/
1000000
);
}
src/comm/LogReplayLink.h
View file @
28ebe38a
...
...
@@ -121,6 +121,7 @@ private:
void
_finishPlayback
(
void
);
void
_playbackError
(
void
);
void
_resetPlaybackToBeginning
(
void
);
void
_signalCurrentLogTimeSecs
(
void
);
// Virtuals from LinkInterface
virtual
bool
_connect
(
void
);
...
...
src/ui/QGCMAVLinkLogPlayer.cc
View file @
28ebe38a
...
...
@@ -142,7 +142,6 @@ void QGCMAVLinkLogPlayer::_playbackStarted(void)
_enablePlaybackControls
(
true
);
_ui
->
playButton
->
setChecked
(
true
);
_ui
->
playButton
->
setIcon
(
QIcon
(
":/res/Pause"
));
_ui
->
positionSlider
->
setEnabled
(
false
);
}
/// Signalled from LogReplayLink when replay is paused
...
...
@@ -150,7 +149,6 @@ void QGCMAVLinkLogPlayer::_playbackPaused(void)
{
_ui
->
playButton
->
setIcon
(
QIcon
(
":/res/Play"
));
_ui
->
playButton
->
setChecked
(
false
);
_ui
->
positionSlider
->
setEnabled
(
true
);
}
void
QGCMAVLinkLogPlayer
::
_playbackPercentCompleteChanged
(
int
percentComplete
)
...
...
src/ui/QGCMAVLinkLogPlayer.ui
View file @
28ebe38a
...
...
@@ -75,7 +75,7 @@
<number>
100
</number>
</property>
<property
name=
"tracking"
>
<bool>
fals
e
</bool>
<bool>
tru
e
</bool>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
...
...
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