Commit 896dbd48 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3704 from DonLakeFlyer/LogReplayNoTime

Remove speed change support from log replay
parents 4178246c e6b5f103
......@@ -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)
{
......
......@@ -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);
......
......@@ -48,7 +48,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<iconset resource="../../qgcresources.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="../../qgroundcontrol.qrc"/>
<include location="../../qgcresources.qrc"/>
</resources>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment