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
896dbd48
Commit
896dbd48
authored
Jul 01, 2016
by
Don Gagne
Committed by
GitHub
Jul 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3704 from DonLakeFlyer/LogReplayNoTime
Remove speed change support from log replay
parents
4178246c
e6b5f103
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
50 deletions
+18
-50
QGCMAVLinkLogPlayer.cc
src/ui/QGCMAVLinkLogPlayer.cc
+14
-4
QGCMAVLinkLogPlayer.h
src/ui/QGCMAVLinkLogPlayer.h
+2
-0
QGCMAVLinkLogPlayer.ui
src/ui/QGCMAVLinkLogPlayer.ui
+2
-46
No files found.
src/ui/QGCMAVLinkLogPlayer.cc
View file @
896dbd48
...
...
@@ -24,18 +24,22 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(QWidget *parent) :
// Setup buttons
connect
(
_ui
->
selectFileButton
,
&
QPushButton
::
clicked
,
this
,
&
QGCMAVLinkLogPlayer
::
_selectLogFileForPlayback
);
connect
(
_ui
->
playButton
,
&
QPushButton
::
clicked
,
this
,
&
QGCMAVLinkLogPlayer
::
_playPauseToggle
);
connect
(
_ui
->
speedSlider
,
&
QSlider
::
valueChanged
,
this
,
&
QGCMAVLinkLogPlayer
::
_setAccelerationFromSlider
);
connect
(
_ui
->
positionSlider
,
&
QSlider
::
valueChanged
,
this
,
&
QGCMAVLinkLogPlayer
::
_setPlayheadFromSlider
);
connect
(
_ui
->
positionSlider
,
&
QSlider
::
sliderPressed
,
this
,
&
QGCMAVLinkLogPlayer
::
_pause
);
#if 0
// Speed slider is removed from 3.0 release. Too broken to fix.
connect(_ui->speedSlider, &QSlider::valueChanged, this, &QGCMAVLinkLogPlayer::_setAccelerationFromSlider);
_ui->speedSlider->setMinimum(-100);
_ui->speedSlider->setMaximum(100);
_ui->speedSlider->setValue(0);
#endif
_enablePlaybackControls
(
false
);
_ui
->
positionSlider
->
setMinimum
(
0
);
_ui
->
positionSlider
->
setMaximum
(
100
);
_ui
->
speedSlider
->
setMinimum
(
-
100
);
_ui
->
speedSlider
->
setMaximum
(
100
);
_ui
->
speedSlider
->
setValue
(
0
);
}
QGCMAVLinkLogPlayer
::~
QGCMAVLinkLogPlayer
()
...
...
@@ -90,7 +94,9 @@ void QGCMAVLinkLogPlayer::_selectLogFileForPlayback(void)
connect
(
_replayLink
,
&
LogReplayLink
::
disconnected
,
this
,
&
QGCMAVLinkLogPlayer
::
_replayLinkDisconnected
);
_ui
->
positionSlider
->
setValue
(
0
);
#if 0
_ui->speedSlider->setValue(0);
#endif
}
void
QGCMAVLinkLogPlayer
::
_playbackError
(
void
)
...
...
@@ -155,10 +161,13 @@ void QGCMAVLinkLogPlayer::_setPlayheadFromSlider(int value)
void
QGCMAVLinkLogPlayer
::
_enablePlaybackControls
(
bool
enabled
)
{
_ui
->
playButton
->
setEnabled
(
enabled
);
#if 0
_ui->speedSlider->setEnabled(enabled);
#endif
_ui
->
positionSlider
->
setEnabled
(
enabled
);
}
#if 0
void QGCMAVLinkLogPlayer::_setAccelerationFromSlider(int value)
{
//qDebug() << value;
...
...
@@ -183,6 +192,7 @@ void QGCMAVLinkLogPlayer::_setAccelerationFromSlider(int value)
_ui->speedLabel->setText(QString("Speed: %1X").arg(accelerationFactor, 5, 'f', 2, '0'));
}
#endif
void
QGCMAVLinkLogPlayer
::
_replayLinkDisconnected
(
void
)
{
...
...
src/ui/QGCMAVLinkLogPlayer.h
View file @
896dbd48
...
...
@@ -33,7 +33,9 @@ private slots:
void
_playPauseToggle
(
void
);
void
_pause
(
void
);
void
_setPlayheadFromSlider
(
int
value
);
#if 0
void _setAccelerationFromSlider(int value);
#endif
void
_logFileStats
(
bool
logTimestamped
,
int
logDurationSeconds
,
int
binaryBaudRate
);
void
_playbackStarted
(
void
);
void
_playbackPaused
(
void
);
...
...
src/ui/QGCMAVLinkLogPlayer.ui
View file @
896dbd48
...
...
@@ -48,7 +48,7 @@
<string>
...
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../qg
roundcontrol
.qrc"
>
<iconset
resource=
"../../qg
cresources
.qrc"
>
<normaloff>
:/res/Play
</normaloff>
:/res/Play
</iconset>
</property>
<property
name=
"checkable"
>
...
...
@@ -82,50 +82,6 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"speedLabel"
>
<property
name=
"toolTip"
>
<string>
Current replay speed
</string>
</property>
<property
name=
"statusTip"
>
<string>
Current replay speed
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Current replay speed
</string>
</property>
<property
name=
"text"
>
<string>
Speed
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"speedSlider"
>
<property
name=
"toolTip"
>
<string>
Set the replay speed
</string>
</property>
<property
name=
"statusTip"
>
<string>
Set the replay speed
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Set the replay speed
</string>
</property>
<property
name=
"minimum"
>
<number>
1
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"sliderPosition"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"logFileNameLabel"
>
<property
name=
"text"
>
...
...
@@ -152,7 +108,7 @@
</layout>
</widget>
<resources>
<include
location=
"../../qg
roundcontrol
.qrc"
/>
<include
location=
"../../qg
cresources
.qrc"
/>
</resources>
<connections/>
</ui>
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