mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +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);
|
||||
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);
|
||||
emit statusChanged(ISimulator::Connected);
|
||||
return true;
|
||||
@@ -126,7 +126,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
delete m_service;
|
||||
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())
|
||||
{
|
||||
@@ -148,6 +148,14 @@ namespace BlackSimPlugin
|
||||
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
|
||||
BlackMisc::Aviation::CTransponder::TransponderMode xpdrMode(int xplaneMode, bool ident)
|
||||
{
|
||||
@@ -191,7 +199,7 @@ namespace BlackSimPlugin
|
||||
BlackMisc::Network::CAircraftModel CSimulatorXPlane::getAircraftModel() const
|
||||
{
|
||||
if (! isConnected()) { return {}; }
|
||||
return m_xplaneData.aircraftModelPath;
|
||||
return { m_xplaneData.aircraftModelPath, true };
|
||||
}
|
||||
|
||||
bool CSimulatorXPlane::updateOwnSimulatorCockpit(const BlackMisc::Aviation::CAircraft &aircraft)
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace BlackSimPlugin
|
||||
private slots:
|
||||
void serviceRegistered(const QString &serviceName);
|
||||
void serviceUnregistered();
|
||||
void emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao);
|
||||
void fastTimerTimeout();
|
||||
void slowTimerTimeout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user