Make FSUIPC optional

Summary:
If FSUIPC is configured, its support will be enabled in swift
and disabled otherwise.

Ref T91

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Subscribers: msutcliffe, jenkins, kbasan

Maniphest Tasks: T91

Differential Revision: https://dev.swift-project.org/D28
This commit is contained in:
Roland Winklmeier
2017-06-20 21:00:01 +02:00
parent 55b7a519d1
commit a00108af35
11 changed files with 141 additions and 32 deletions

View File

@@ -33,7 +33,7 @@ namespace BlackSimPlugin
Weather::IWeatherGridProvider *weatherGridProvider,
QObject *parent) :
CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, parent),
m_fsuipc(new CFsuipc())
m_fsuipc(std::make_unique<CFsuipc>(this))
{
CSimulatorFsCommon::registerHelp();
}
@@ -79,7 +79,7 @@ namespace BlackSimPlugin
bool CSimulatorFsCommon::isFsuipcConnected() const
{
return !m_fsuipc.isNull() && m_fsuipc->isConnected();
return m_fsuipc && m_fsuipc->isConnected();
}
bool CSimulatorFsCommon::useFsuipc(bool on)