From 10e6745e21bafb8f3261effce5382d6f49efe7e1 Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Fri, 6 Jul 2018 15:15:14 -0400 Subject: [PATCH] Don't send telemetry when main simulator is not running. --- companion/src/simulation/telemetrysimu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/companion/src/simulation/telemetrysimu.cpp b/companion/src/simulation/telemetrysimu.cpp index fac21548d..8253c8e77 100644 --- a/companion/src/simulation/telemetrysimu.cpp +++ b/companion/src/simulation/telemetrysimu.cpp @@ -97,6 +97,9 @@ void TelemetrySimulator::showEvent(QShowEvent * event) void TelemetrySimulator::startTelemetry() { + if (!m_simuStarted) + return; + timer.start(); if (m_logReplayEnable) onPlay(); @@ -125,11 +128,14 @@ void TelemetrySimulator::onSimulatorStarted() { m_simuStarted = true; setupDataFields(); + if (isVisible() && g.currentProfile().telemSimEnabled()) + startTelemetry(); } void TelemetrySimulator::onSimulatorStopped() { m_simuStarted = false; + stopTelemetry(); } void TelemetrySimulator::onSimulateToggled(bool isChecked)