refs #916, interpolator mode for XP

This commit is contained in:
Klaus Basan
2017-03-17 19:05:51 +01:00
committed by Mathew Sutcliffe
parent e2849f171e
commit 304c552872
6 changed files with 35 additions and 19 deletions

View File

@@ -381,11 +381,19 @@ namespace BlackSimPlugin
Q_UNUSED(offset);
if (enable)
{
CLogMessage(this).info("X-Plane provides real time synchronization, use this on");
CLogMessage(this).info("X-Plane provides real time synchronization, use this one");
}
return false;
}
bool CSimulatorXPlane::setInterpolatorMode(CInterpolatorMulti::Mode mode, const CCallsign &callsign)
{
if (!isConnected()) { return false; }
m_traffic->setInterpolatorMode(callsign.asString(), mode == CInterpolatorMulti::ModeSpline);
return true;
}
QDBusConnection CSimulatorXPlane::connectionFromString(const QString &str)
{
if (str == BlackMisc::CDBusServer::sessionBusAddress())

View File

@@ -97,6 +97,7 @@ namespace BlackSimPlugin
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const override;
virtual bool setTimeSynchronization(bool enable, const BlackMisc::PhysicalQuantities::CTime &offset) override;
virtual BlackMisc::PhysicalQuantities::CTime getTimeSynchronizationOffset() const override { return BlackMisc::PhysicalQuantities::CTime(0, BlackMisc::PhysicalQuantities::CTimeUnit::hrmin()); }
virtual bool setInterpolatorMode(BlackMisc::Simulation::CInterpolatorMulti::Mode mode, const BlackMisc::Aviation::CCallsign &callsign) override;
//! @}
//! Creates an appropriate dbus connection from the string describing it

View File

@@ -103,5 +103,10 @@ namespace BlackSimPlugin
m_dbusInterface->callDBus(QLatin1String("setPlaneTransponder"), callsign, code, modeC, ident);
}
void CXBusTrafficProxy::setInterpolatorMode(const QString &callsign, bool spline)
{
m_dbusInterface->callDBus(QLatin1String("setInterpolatorMode"), callsign, spline);
}
}
}

View File

@@ -111,6 +111,9 @@ namespace BlackSimPlugin
//! \copydoc XBus::CTraffic::setPlaneTransponder
void setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident);
//! \copydoc XBus::CTraffic::setInterpolatorMode
void setInterpolatorMode(const QString &callsign, bool spline);
};
}