mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user