mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
Removed clamped messages
This commit is contained in:
@@ -150,7 +150,6 @@ namespace BlackCore
|
||||
// rendering related stuff
|
||||
m_addAgainAircraftWhenRemoved.clear();
|
||||
m_callsignsToBeRendered.clear();
|
||||
m_clampedLogMsg.clear();
|
||||
m_lastSentParts.clear();
|
||||
m_lastSentSituations.clear();
|
||||
m_updateRemoteAircraftInProgress = false;
|
||||
@@ -204,10 +203,8 @@ namespace BlackCore
|
||||
{
|
||||
m_highlightedAircraft.removeByCallsign(callsign);
|
||||
m_statsPhysicallyRemovedAircraft++;
|
||||
m_clampedLogMsg.clear();
|
||||
m_lastSentParts.remove(callsign);
|
||||
m_lastSentSituations.remove(callsign);
|
||||
m_clampedLogMsg.remove(callsign);
|
||||
m_loopbackSituations.clear();
|
||||
this->removeInterpolationSetupPerCallsign(callsign);
|
||||
}
|
||||
@@ -1011,25 +1008,6 @@ namespace BlackCore
|
||||
return m + addDetails.arg(details);
|
||||
}
|
||||
|
||||
/** deprecated 2018-11
|
||||
bool ISimulator::clampedLog(const CCallsign &callsign, const CStatusMessage &message)
|
||||
{
|
||||
if (message.isEmpty()) { return false; }
|
||||
constexpr qint64 Timeout = 2000;
|
||||
const qint64 clampTs = m_clampedLogMsg.value(callsign, -1);
|
||||
const qint64 ts = QDateTime::currentMSecsSinceEpoch();
|
||||
if (clampTs > 0 && ((clampTs + Timeout) > ts)) { return false; }
|
||||
CLogMessage::preformatted(message);
|
||||
m_clampedLogMsg[callsign] = ts;
|
||||
return true;
|
||||
}
|
||||
|
||||
void ISimulator::removedClampedLog(const CCallsign &callsign)
|
||||
{
|
||||
m_clampedLogMsg.remove(callsign);
|
||||
}
|
||||
depreatced **/
|
||||
|
||||
void ISimulator::finishUpdateRemoteAircraftAndSetStatistics(qint64 startTime, bool limited)
|
||||
{
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
@@ -520,18 +520,6 @@ 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
|
||||
//! \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
|
||||
//! \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
|
||||
//! \deprecated KB 2018-11
|
||||
// void removedClampedLog(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Update stats and flags
|
||||
void finishUpdateRemoteAircraftAndSetStatistics(qint64 startTime, bool limited = false);
|
||||
|
||||
@@ -553,7 +541,6 @@ namespace BlackCore
|
||||
|
||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log.interpolation
|
||||
BlackMisc::Aviation::CTimestampPerCallsign m_clampedLogMsg; //!< when logged last for this callsign, can be used so there is no log message overflow
|
||||
BlackMisc::Aviation::CAircraftSituationPerCallsign m_lastSentSituations; //!< last situations sent to simulator
|
||||
BlackMisc::Aviation::CAircraftPartsPerCallsign m_lastSentParts; //!< last parts sent to simulator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user