mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #863 Move interpolator logging into a separate class.
A single logger instance can be shared between multiple interpolator instances.
This commit is contained in:
@@ -118,13 +118,14 @@ namespace BlackSimPlugin
|
||||
return positionSlewMode;
|
||||
}
|
||||
|
||||
CFs9Client::CFs9Client(const CCallsign &callsign, const QString &modelName,
|
||||
const CTime &updateInterval, QObject *owner) :
|
||||
CFs9Client::CFs9Client(const CCallsign &callsign, const QString &modelName, const CTime &updateInterval,
|
||||
BlackMisc::Simulation::CInterpolationLogger *logger, QObject *owner) :
|
||||
CDirectPlayPeer(owner, callsign),
|
||||
m_updateInterval(updateInterval),
|
||||
m_interpolator(callsign),
|
||||
m_modelName(modelName)
|
||||
{
|
||||
m_interpolator.attachLogger(logger);
|
||||
}
|
||||
|
||||
CFs9Client::~CFs9Client()
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace BlackSimPlugin
|
||||
|
||||
//! Constructor
|
||||
CFs9Client(const BlackMisc::Aviation::CCallsign &callsign, const QString &modelName,
|
||||
const BlackMisc::PhysicalQuantities::CTime &updateInterval, QObject *owner);
|
||||
const BlackMisc::PhysicalQuantities::CTime &updateInterval,
|
||||
BlackMisc::Simulation::CInterpolationLogger *logger, QObject *owner);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CFs9Client();
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace BlackSimPlugin
|
||||
|
||||
bool rendered = true;
|
||||
updateAircraftRendered(callsign, rendered);
|
||||
CFs9Client *client = new CFs9Client(callsign, newRemoteAircraft.getModelString(), CTime(25, CTimeUnit::ms()), this);
|
||||
CFs9Client *client = new CFs9Client(callsign, newRemoteAircraft.getModelString(), CTime(25, CTimeUnit::ms()), &m_interpolationLogger, this);
|
||||
client->setHostAddress(m_fs9Host->getHostAddress());
|
||||
client->setPlayerUserId(m_fs9Host->getPlayerUserId());
|
||||
client->start();
|
||||
|
||||
Reference in New Issue
Block a user