Ref T275, Ref T280, Ref T245 FSX simulator improvements

* request model info
* stricter checks (asserts)
* display simulator debug messages in simulator view (not as normal status message)
This commit is contained in:
Klaus Basan
2018-06-27 01:30:04 +02:00
parent 9baa10c5f8
commit 1f689a8830
7 changed files with 94 additions and 23 deletions

View File

@@ -194,23 +194,26 @@ namespace BlackCore
return false;
}
void CSimulatorCommon::debugLogMessage(const QString &msg) const
void CSimulatorCommon::debugLogMessage(const QString &msg)
{
if (!this->showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info(msg);
const CStatusMessage m = CStatusMessage(this).info("%1") << msg;
emit this->driverMessages(m);
}
void CSimulatorCommon::debugLogMessage(const QString &funcInfo, const QString &msg) const
void CSimulatorCommon::debugLogMessage(const QString &funcInfo, const QString &msg)
{
if (!this->showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info("%1 %2") << msg << funcInfo;
const CStatusMessage m = CStatusMessage(this).info("%1 %2") << msg << funcInfo;
emit this->driverMessages(m);
}
bool CSimulatorCommon::showDebugLogMessage() const
{
return this->getInterpolationSetupGlobal().showSimulatorDebugMessages();
const bool show = this->getInterpolationSetupGlobal().showSimulatorDebugMessages();
return show;
}
void CSimulatorCommon::reverseLookupAndUpdateOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)

View File

@@ -219,11 +219,11 @@ namespace BlackCore
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
//! remark shows log messages of functions calls
void debugLogMessage(const QString &msg) const;
void debugLogMessage(const QString &msg);
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
//! remark shows log messages of functions calls
void debugLogMessage(const QString &funcInfo, const QString &msg) const;
void debugLogMessage(const QString &funcInfo, const QString &msg);
//! Show log messages?
bool showDebugLogMessage() const;