Don't send telemetry when main simulator is not running.
This commit is contained in:
@@ -97,6 +97,9 @@ void TelemetrySimulator::showEvent(QShowEvent * event)
|
|||||||
|
|
||||||
void TelemetrySimulator::startTelemetry()
|
void TelemetrySimulator::startTelemetry()
|
||||||
{
|
{
|
||||||
|
if (!m_simuStarted)
|
||||||
|
return;
|
||||||
|
|
||||||
timer.start();
|
timer.start();
|
||||||
if (m_logReplayEnable)
|
if (m_logReplayEnable)
|
||||||
onPlay();
|
onPlay();
|
||||||
@@ -125,11 +128,14 @@ void TelemetrySimulator::onSimulatorStarted()
|
|||||||
{
|
{
|
||||||
m_simuStarted = true;
|
m_simuStarted = true;
|
||||||
setupDataFields();
|
setupDataFields();
|
||||||
|
if (isVisible() && g.currentProfile().telemSimEnabled())
|
||||||
|
startTelemetry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onSimulatorStopped()
|
void TelemetrySimulator::onSimulatorStopped()
|
||||||
{
|
{
|
||||||
m_simuStarted = false;
|
m_simuStarted = false;
|
||||||
|
stopTelemetry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onSimulateToggled(bool isChecked)
|
void TelemetrySimulator::onSimulateToggled(bool isChecked)
|
||||||
|
|||||||
Reference in New Issue
Block a user