mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T421, interpolation log message follow up, deprecated "clampedLog"
This commit is contained in:
@@ -972,6 +972,7 @@ namespace BlackCore
|
||||
return m + addDetails.arg(details);
|
||||
}
|
||||
|
||||
/** deprecated 2018-11
|
||||
bool ISimulator::clampedLog(const CCallsign &callsign, const CStatusMessage &message)
|
||||
{
|
||||
if (message.isEmpty()) { return false; }
|
||||
@@ -988,6 +989,7 @@ namespace BlackCore
|
||||
{
|
||||
m_clampedLogMsg.remove(callsign);
|
||||
}
|
||||
depreatced **/
|
||||
|
||||
void ISimulator::setStatsRemoteAircraftUpdate(qint64 startTime, bool limited)
|
||||
{
|
||||
|
||||
@@ -505,15 +505,17 @@ namespace BlackCore
|
||||
//! Info about invalid situation
|
||||
QString getInvalidSituationLogMessage(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Simulation::CInterpolationStatus &status, const QString &details = {}) const;
|
||||
|
||||
//! Can a new log message be generated without generating a "message" overflow
|
||||
//! Can a (new) log message be generated without generating a "message" overflow
|
||||
//! \remark works per callsign
|
||||
//! \remark use this function when there is a risk that a lot of log. messages will be generated in a short time
|
||||
bool clampedLog(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CStatusMessage &message);
|
||||
//! \deprecated KB 2018-11
|
||||
// bool clampedLog(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CStatusMessage &message);
|
||||
|
||||
//! Mark as justed logged
|
||||
//! \remark touch, but also return if it can be logged
|
||||
//! \remark use this function when there is a risk that a lot of log. messages will be generated in a short time
|
||||
void removedClampedLog(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
//! \deprecated KB 2018-11
|
||||
// void removedClampedLog(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Update stats and flags
|
||||
void setStatsRemoteAircraftUpdate(qint64 startTime, bool limited = false);
|
||||
|
||||
@@ -279,6 +279,7 @@ namespace BlackMisc
|
||||
|
||||
// values for current interpolation step
|
||||
qint64 m_currentTimeMsSinceEpoch = -1; //!< current time
|
||||
qint64 m_lastInvalidLogTs = -1; //!< last invalid situation timestamp
|
||||
Aviation::CAircraftSituationList m_currentSituations; //!< current situations obtained by remoteAircraftSituationsAndChange
|
||||
Aviation::CAircraftSituationChange m_pastSituationsChange; //!< situations change of provider (i.e. network) situations
|
||||
CInterpolationAndRenderingSetupPerCallsign m_currentSetup; //!< used setup
|
||||
@@ -288,7 +289,6 @@ namespace BlackMisc
|
||||
int m_partsToSituationInterpolationRatio = 2; //!< ratio between parts and situation interpolation, 1..always, 2..every 2nd situation
|
||||
int m_partsToSituationGuessingRatio = 5; //!< ratio between parts guessing and situation interpolation
|
||||
int m_invalidSituations = 0; //!< mainly when there are no new situations
|
||||
qint64 m_lastInvalidLogTs = -1; //!< last invalid situation timestamp
|
||||
CStatusMessageList m_interpolationMessages; //!< interpolation messages
|
||||
|
||||
Aviation::CAircraftSituation m_lastSituation { Aviation::CAircraftSituation::null() }; //!< latest interpolation
|
||||
|
||||
@@ -1426,8 +1426,7 @@ namespace BlackSimPlugin
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
{
|
||||
BLACK_VERIFY_X(invalidSituation, Q_FUNC_INFO, "Expect valid situation");
|
||||
const CStatusMessage sm = CStatusMessage(this).warning("Invalid situation for '%1'") << callsign;
|
||||
this->clampedLog(callsign, sm);
|
||||
CLogMessage(this).warning("Invalid situation for '%1'") << callsign;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1775,7 +1774,6 @@ namespace BlackSimPlugin
|
||||
if (isOk(hr))
|
||||
{
|
||||
this->rememberLastSent(result); // remember
|
||||
this->removedClampedLog(callsign);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1784,7 +1782,7 @@ namespace BlackSimPlugin
|
||||
// already logged in interpolator
|
||||
continue;
|
||||
|
||||
/**
|
||||
/** KB removed 2018-11 as already logged in interpolator
|
||||
static const QString so("SimObject id: %1");
|
||||
const QString msg = this->getInvalidSituationLogMessage(callsign, result.getInterpolationStatus(), so.arg(objectId));
|
||||
const CStatusMessage sm(this, CStatusMessage::SeverityWarning, msg);
|
||||
|
||||
Reference in New Issue
Block a user