mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 18:55:38 +08:00
refactor: Fix spelling mistake
This commit is contained in:
@@ -212,11 +212,11 @@ namespace BlackMisc::Simulation
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
CInterpolationResult CInterpolator<Derived>::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber)
|
CInterpolationResult CInterpolator<Derived>::getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber)
|
||||||
{
|
{
|
||||||
CInterpolationResult result;
|
CInterpolationResult result;
|
||||||
|
|
||||||
const bool init = this->initIniterpolationStepData(currentTimeSinceEpoc, setup, aircraftNumber);
|
const bool init = this->initIniterpolationStepData(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
Q_ASSERT_X(!m_currentInterpolationStatus.isInterpolated(), Q_FUNC_INFO, "Expect reset status");
|
Q_ASSERT_X(!m_currentInterpolationStatus.isInterpolated(), Q_FUNC_INFO, "Expect reset status");
|
||||||
if (init || m_unitTest) // ignore failure in unittest
|
if (init || m_unitTest) // ignore failure in unittest
|
||||||
{
|
{
|
||||||
@@ -673,7 +673,7 @@ namespace BlackMisc::Simulation
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
bool CInterpolator<Derived>::initIniterpolationStepData(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber)
|
bool CInterpolator<Derived>::initIniterpolationStepData(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(!m_callsign.isEmpty(), Q_FUNC_INFO, "Missing callsign");
|
Q_ASSERT_X(!m_callsign.isEmpty(), Q_FUNC_INFO, "Missing callsign");
|
||||||
|
|
||||||
@@ -681,7 +681,7 @@ namespace BlackMisc::Simulation
|
|||||||
const bool slowUpdateStep = (((m_interpolatedSituationsCounter + aircraftNumber) % 25) == 0); // flag when parts are updated, which need not to be updated every time
|
const bool slowUpdateStep = (((m_interpolatedSituationsCounter + aircraftNumber) % 25) == 0); // flag when parts are updated, which need not to be updated every time
|
||||||
const bool changedSituations = lastModifed > m_situationsLastModified;
|
const bool changedSituations = lastModifed > m_situationsLastModified;
|
||||||
|
|
||||||
m_currentTimeMsSinceEpoch = currentTimeSinceEpoc;
|
m_currentTimeMsSinceEpoch = currentTimeSinceEpoch;
|
||||||
m_currentInterpolationStatus.reset();
|
m_currentInterpolationStatus.reset();
|
||||||
m_currentPartsStatus.reset();
|
m_currentPartsStatus.reset();
|
||||||
m_currentSetup = setup;
|
m_currentSetup = setup;
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ namespace BlackMisc
|
|||||||
const Aviation::CAircraftSituation &getLastInterpolatedSituation() const { return m_lastSituation; }
|
const Aviation::CAircraftSituation &getLastInterpolatedSituation() const { return m_lastSituation; }
|
||||||
|
|
||||||
//! Parts and situation interpolated
|
//! Parts and situation interpolated
|
||||||
CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber);
|
CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber);
|
||||||
|
|
||||||
//! Attach an observer to read the interpolator's state for debugging
|
//! Attach an observer to read the interpolator's state for debugging
|
||||||
//! \remark parts logging has a \c bool \c log flag
|
//! \remark parts logging has a \c bool \c log flag
|
||||||
@@ -232,10 +232,10 @@ namespace BlackMisc
|
|||||||
CInterpolationLogger *logger);
|
CInterpolationLogger *logger);
|
||||||
|
|
||||||
//! Inits all data for this current interpolation step
|
//! Inits all data for this current interpolation step
|
||||||
//! \param currentTimeSinceEpoc
|
//! \param currentTimeSinceEpoch
|
||||||
//! \param setup
|
//! \param setup
|
||||||
//! \param aircraftNumber passing the aircraft number allows to equally distribute among the steps and not to do it always together for all aircraft
|
//! \param aircraftNumber passing the aircraft number allows to equally distribute among the steps and not to do it always together for all aircraft
|
||||||
bool initIniterpolationStepData(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber);
|
bool initIniterpolationStepData(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber);
|
||||||
|
|
||||||
//! Init the interpolated situation
|
//! Init the interpolated situation
|
||||||
Aviation::CAircraftSituation initInterpolatedSituation(const Aviation::CAircraftSituation &oldSituation, const Aviation::CAircraftSituation &newSituation) const;
|
Aviation::CAircraftSituation initInterpolatedSituation(const Aviation::CAircraftSituation &oldSituation, const Aviation::CAircraftSituation &newSituation) const;
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ namespace BlackMisc::Simulation
|
|||||||
m_linear(callsign, p1, p2, p3, logger)
|
m_linear(callsign, p1, p2, p3, logger)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CInterpolationResult CInterpolatorMulti::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber)
|
CInterpolationResult CInterpolatorMulti::getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber)
|
||||||
{
|
{
|
||||||
switch (setup.getInterpolatorMode())
|
switch (setup.getInterpolatorMode())
|
||||||
{
|
{
|
||||||
case CInterpolationAndRenderingSetupBase::Linear: return m_linear.getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
case CInterpolationAndRenderingSetupBase::Linear: return m_linear.getInterpolation(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
case CInterpolationAndRenderingSetupBase::Spline: return m_spline.getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
case CInterpolationAndRenderingSetupBase::Spline: return m_spline.getInterpolation(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace BlackMisc::Simulation
|
|||||||
CInterpolationLogger *logger = nullptr);
|
CInterpolationLogger *logger = nullptr);
|
||||||
|
|
||||||
//! \copydoc CInterpolator::getInterpolation
|
//! \copydoc CInterpolator::getInterpolation
|
||||||
CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber);
|
CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber);
|
||||||
|
|
||||||
//! \copydoc CInterpolator::getLastInterpolatedSituation
|
//! \copydoc CInterpolator::getLastInterpolatedSituation
|
||||||
const Aviation::CAircraftSituation &getLastInterpolatedSituation(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
const Aviation::CAircraftSituation &getLastInterpolatedSituation(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ namespace BlackSimPlugin::Flightgear
|
|||||||
m_interpolator->attachLogger(logger);
|
m_interpolator->attachLogger(logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterpolationResult CFlightgearMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
CInterpolationResult CFlightgearMPAircraft::getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_interpolator);
|
Q_ASSERT(m_interpolator);
|
||||||
return m_interpolator->getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
return m_interpolator->getInterpolation(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
CStatusMessageList CFlightgearMPAircraft::getInterpolationMessages(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
CStatusMessageList CFlightgearMPAircraft::getInterpolationMessages(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace BlackSimPlugin::Flightgear
|
|||||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
||||||
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ namespace BlackSimPlugin::FsxCommon
|
|||||||
m_interpolator->attachLogger(logger);
|
m_interpolator->attachLogger(logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterpolationResult CSimConnectObject::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
CInterpolationResult CSimConnectObject::getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||||
{
|
{
|
||||||
if (!m_interpolator)
|
if (!m_interpolator)
|
||||||
{
|
{
|
||||||
@@ -213,7 +213,7 @@ namespace BlackSimPlugin::FsxCommon
|
|||||||
result.reset();
|
result.reset();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return m_interpolator->getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
return m_interpolator->getInterpolation(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CAircraftSituation &CSimConnectObject::getLastInterpolatedSituation(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
const CAircraftSituation &CSimConnectObject::getLastInterpolatedSituation(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ namespace BlackSimPlugin::FsxCommon
|
|||||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getLastInterpolatedSituation
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getLastInterpolatedSituation
|
||||||
const BlackMisc::Aviation::CAircraftSituation &getLastInterpolatedSituation(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
const BlackMisc::Aviation::CAircraftSituation &getLastInterpolatedSituation(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ namespace BlackSimPlugin::XPlane
|
|||||||
m_interpolator->attachLogger(logger);
|
m_interpolator->attachLogger(logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterpolationResult CXPlaneMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
CInterpolationResult CXPlaneMPAircraft::getInterpolation(qint64 currentTimeSinceEpoch, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_interpolator);
|
Q_ASSERT(m_interpolator);
|
||||||
return m_interpolator->getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
return m_interpolator->getInterpolation(currentTimeSinceEpoch, setup, aircraftNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
CStatusMessageList CXPlaneMPAircraft::getInterpolationMessages(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
CStatusMessageList CXPlaneMPAircraft::getInterpolationMessages(CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace BlackSimPlugin::XPlane
|
|||||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
||||||
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user