mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T27, utility functions for debug messages
This commit is contained in:
committed by
Mathew Sutcliffe
parent
042f725e54
commit
bd67824ce6
@@ -198,6 +198,25 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
void CSimulatorCommon::debugLogMessage(const QString &msg) const
|
||||
{
|
||||
if (!showDebugLogMessage()) { return; }
|
||||
if (msg.isEmpty()) { return; }
|
||||
CLogMessage(this).info(msg);
|
||||
}
|
||||
|
||||
void CSimulatorCommon::debugLogMessage(const QString &funcInfo, const QString &msg) const
|
||||
{
|
||||
if (!showDebugLogMessage()) { return; }
|
||||
if (msg.isEmpty()) { return; }
|
||||
CLogMessage(this).info("%1 %2") << msg << funcInfo;
|
||||
}
|
||||
|
||||
bool CSimulatorCommon::showDebugLogMessage() const
|
||||
{
|
||||
return m_interpolationRenderingSetup.showSimulatorDebugMessages();
|
||||
}
|
||||
|
||||
void CSimulatorCommon::reverseLookupAndUpdateOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
|
||||
{
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing sApp");
|
||||
|
||||
@@ -192,6 +192,15 @@ namespace BlackCore
|
||||
//! Parse driver specific details for ISimulator::parseCommandLine
|
||||
virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser);
|
||||
|
||||
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
|
||||
void debugLogMessage(const QString &msg) const;
|
||||
|
||||
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
|
||||
void debugLogMessage(const QString &funcInfo, const QString &msg) const;
|
||||
|
||||
//! Show log messages?
|
||||
bool showDebugLogMessage() const;
|
||||
|
||||
bool m_pausedSimFreezesInterpolation = false; //!< paused simulator will also pause interpolation (so AI aircraft will hold)
|
||||
BlackMisc::Simulation::CAircraftModel m_defaultModel; //!< default model
|
||||
int m_statsUpdateAircraftCountMs = 0; //!< statistics update count
|
||||
|
||||
Reference in New Issue
Block a user