mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T786, enable weather in sim. if plugin changed
This commit is contained in:
committed by
Mat Sutcliffe
parent
387d47ebf8
commit
5678052b5d
@@ -566,21 +566,24 @@ namespace BlackCore
|
||||
|
||||
// Emit signal after this function completes completely decoupled
|
||||
QPointer<CContextSimulator> myself(this);
|
||||
QTimer::singleShot(0, this, [ = ]
|
||||
QTimer::singleShot(25, this, [ = ]
|
||||
{
|
||||
if (!myself) { return; }
|
||||
if (!myself || !sApp || sApp->isShuttingDown()) { return; }
|
||||
if (m_simulatorPlugin.second)
|
||||
{
|
||||
CLogMessage(this).info(u"Simulator plugin loaded: '%1' connected: %2")
|
||||
<< simulatorPluginInfo.toQString(true)
|
||||
<< boolToYesNo(connected);
|
||||
|
||||
// weather in sim.
|
||||
this->setWeatherActivated(m_isWeatherActivated);
|
||||
|
||||
// use the real driver as this will also work eith emulated driver
|
||||
emit this->simulatorPluginChanged(m_simulatorPlugin.second->getSimulatorPluginInfo());
|
||||
emit this->simulatorChanged(m_simulatorPlugin.second->getSimulatorInfo());
|
||||
}
|
||||
});
|
||||
|
||||
CLogMessage(this).info(u"Simulator plugin loaded: '%1' connected: %2")
|
||||
<< simulatorPluginInfo.toQString(true)
|
||||
<< boolToYesNo(connected);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user