mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 01:35:45 +08:00
committed by
Mathew Sutcliffe
parent
1f61458504
commit
1032379773
@@ -54,7 +54,7 @@ namespace BlackSimPlugin
|
|||||||
m_realityBubbleTimer.setInterval(20 * 1000);
|
m_realityBubbleTimer.setInterval(20 * 1000);
|
||||||
connect(&m_realityBubbleTimer, &QTimer::timeout, this, &CSimulatorFsx::ps_addAircraftCurrentlyOutOfBubble);
|
connect(&m_realityBubbleTimer, &QTimer::timeout, this, &CSimulatorFsx::ps_addAircraftCurrentlyOutOfBubble);
|
||||||
|
|
||||||
m_useFsuipc = true; // Temporarily enabled until Simconnect Weather is implemented.
|
m_useFsuipc = false; // Temporarily enabled until Simconnect Weather is implemented.
|
||||||
m_interpolator = new CInterpolatorLinear(remoteAircraftProvider, this);
|
m_interpolator = new CInterpolatorLinear(remoteAircraftProvider, this);
|
||||||
m_defaultModel =
|
m_defaultModel =
|
||||||
{
|
{
|
||||||
@@ -1057,9 +1057,13 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
void CSimulatorFsx::injectWeatherGrid(const Weather::CWeatherGrid &weatherGrid)
|
void CSimulatorFsx::injectWeatherGrid(const Weather::CWeatherGrid &weatherGrid)
|
||||||
{
|
{
|
||||||
if (!m_useFsuipc || !m_fsuipc) { return; }
|
// So far, there is only global weather
|
||||||
if (!m_fsuipc->isConnected()) { return; }
|
auto glob = weatherGrid.frontOrDefault();
|
||||||
m_fsuipc->write(weatherGrid);
|
glob.setIdentifier("GLOB");
|
||||||
|
QString metar = CSimConnectUtilities::convertToSimConnectMetar(glob);
|
||||||
|
SimConnect_WeatherSetModeCustom(m_hSimConnect);
|
||||||
|
SimConnect_WeatherSetModeGlobal(m_hSimConnect);
|
||||||
|
SimConnect_WeatherSetObservation(m_hSimConnect, 0, qPrintable(metar));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorFsx::requestDataForSimObject(const CSimConnectObject &simObject, SIMCONNECT_PERIOD period)
|
bool CSimulatorFsx::requestDataForSimObject(const CSimConnectObject &simObject, SIMCONNECT_PERIOD period)
|
||||||
|
|||||||
Reference in New Issue
Block a user