mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
integration refs #267 fix compile error in simulator_xplane introduced by commit:426dd4a0
This commit is contained in:
@@ -86,7 +86,7 @@ namespace BlackSimPlugin
|
|||||||
m_traffic = new CXBusTrafficProxy(m_conn, this);
|
m_traffic = new CXBusTrafficProxy(m_conn, this);
|
||||||
if (m_service->isValid() && m_traffic->isValid() && m_traffic->initialize())
|
if (m_service->isValid() && m_traffic->isValid() && m_traffic->initialize())
|
||||||
{
|
{
|
||||||
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::aircraftModelChanged);
|
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::emitAircraftModelChanged);
|
||||||
m_watcher->setConnection(m_conn);
|
m_watcher->setConnection(m_conn);
|
||||||
emit statusChanged(ISimulator::Connected);
|
emit statusChanged(ISimulator::Connected);
|
||||||
return true;
|
return true;
|
||||||
@@ -126,7 +126,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
delete m_service;
|
delete m_service;
|
||||||
m_service = new CXBusServiceProxy(m_conn, this);
|
m_service = new CXBusServiceProxy(m_conn, this);
|
||||||
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::aircraftModelChanged);
|
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::emitAircraftModelChanged);
|
||||||
}
|
}
|
||||||
else if (serviceName == CXBusTrafficProxy::InterfaceName())
|
else if (serviceName == CXBusTrafficProxy::InterfaceName())
|
||||||
{
|
{
|
||||||
@@ -148,6 +148,14 @@ namespace BlackSimPlugin
|
|||||||
emit statusChanged(ISimulator::Disconnected);
|
emit statusChanged(ISimulator::Disconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSimulatorXPlane::emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao)
|
||||||
|
{
|
||||||
|
emit aircraftModelChanged({ path, true });
|
||||||
|
Q_UNUSED(filename);
|
||||||
|
Q_UNUSED(livery);
|
||||||
|
Q_UNUSED(icao);
|
||||||
|
}
|
||||||
|
|
||||||
// convert xplane squawk mode to swift squawk mode
|
// convert xplane squawk mode to swift squawk mode
|
||||||
BlackMisc::Aviation::CTransponder::TransponderMode xpdrMode(int xplaneMode, bool ident)
|
BlackMisc::Aviation::CTransponder::TransponderMode xpdrMode(int xplaneMode, bool ident)
|
||||||
{
|
{
|
||||||
@@ -191,7 +199,7 @@ namespace BlackSimPlugin
|
|||||||
BlackMisc::Network::CAircraftModel CSimulatorXPlane::getAircraftModel() const
|
BlackMisc::Network::CAircraftModel CSimulatorXPlane::getAircraftModel() const
|
||||||
{
|
{
|
||||||
if (! isConnected()) { return {}; }
|
if (! isConnected()) { return {}; }
|
||||||
return m_xplaneData.aircraftModelPath;
|
return { m_xplaneData.aircraftModelPath, true };
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorXPlane::updateOwnSimulatorCockpit(const BlackMisc::Aviation::CAircraft &aircraft)
|
bool CSimulatorXPlane::updateOwnSimulatorCockpit(const BlackMisc::Aviation::CAircraft &aircraft)
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ namespace BlackSimPlugin
|
|||||||
private slots:
|
private slots:
|
||||||
void serviceRegistered(const QString &serviceName);
|
void serviceRegistered(const QString &serviceName);
|
||||||
void serviceUnregistered();
|
void serviceUnregistered();
|
||||||
|
void emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao);
|
||||||
void fastTimerTimeout();
|
void fastTimerTimeout();
|
||||||
void slowTimerTimeout();
|
void slowTimerTimeout();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user