From 1523f3a45a81dc6f6f23c7896910fbf3a9568caf Mon Sep 17 00:00:00 2001 From: lm Date: Mon, 10 Jan 2011 14:27:29 +0100 Subject: [PATCH] Added safety check for log player --- src/ui/QGCMAVLinkLogPlayer.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/QGCMAVLinkLogPlayer.cc b/src/ui/QGCMAVLinkLogPlayer.cc index 1a4364fd3..7624ce288 100644 --- a/src/ui/QGCMAVLinkLogPlayer.cc +++ b/src/ui/QGCMAVLinkLogPlayer.cc @@ -119,6 +119,13 @@ void QGCMAVLinkLogPlayer::setAccelerationFactorInt(int factor) void QGCMAVLinkLogPlayer::loadLogFile(const QString& file) { + // Check if logging is still enabled + if (mavlink->loggingEnabled()) + { + mavlink->enableLogging(false); + MainWindow::instance()->showInfoMessage(tr("MAVLink Logging Stopped during Replay"), tr("MAVLink logging has been stopped during the log replay. To re-enable logging, use the link properties in the communication menu.")); + } + // Ensure that the playback process is stopped if (logFile.isOpen()) { -- 2.22.0