Don't send telemetry when main simulator is not running.

This commit is contained in:
Max Paperno
2018-07-06 15:15:14 -04:00
parent b2713df6bb
commit 10e6745e21
@@ -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)