Formatting

This commit is contained in:
Klaus Basan
2017-02-02 00:01:37 +01:00
committed by Mathew Sutcliffe
parent b6ac5cbb45
commit bcb42b0f0d
4 changed files with 8 additions and 8 deletions

View File

@@ -145,7 +145,7 @@ namespace BlackMisc
return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);
}
//! Latest log files: 0 Interpolation 1 Parts
//! Latest log files: 0: Interpolation / 1: Parts
static QStringList getLatestLogFiles();
protected:

View File

@@ -629,7 +629,7 @@ namespace BlackSimPlugin
}
else
{
// object was removed but not requested by us
// object was removed, but removal was not requested by us
// this means we are out of the reality bubble (or something else went wrong)
if (!simObject.getAircraftModelString().isEmpty())
{
@@ -1043,12 +1043,12 @@ namespace BlackSimPlugin
Q_ASSERT(m_hSimConnect);
const DWORD objectId = simObj.getObjectId();
// same as in simulator or same as already send to simulator
// same as in simulator or same as already send to simulator?
const CAircraftLights sentLights(simObj.getLightsAsSent());
if (simObj.getPartsAsSent() == ddRemoteAircraftParts &&
(simObj.getCurrentLightsInSimulator() == lights || sentLights == lights)) { return true; }
// in case we sent we sent everything
// in case we sent, we sent everything
const HRESULT hr = SimConnect_SetDataOnSimObject(m_hSimConnect, CSimConnectDefinitions::DataRemoteAircraftParts,
objectId, SIMCONNECT_DATA_SET_FLAG_DEFAULT, 0,
sizeof(DataDefinitionRemoteAircraftParts), &ddRemoteAircraftParts);

View File

@@ -193,7 +193,7 @@ namespace BlackSimPlugin
bool guessAndUpdateRemoteAircraftParts(const CSimConnectObject &simObj,
const BlackMisc::Aviation::CAircraftSituation &interpolatedSituation, const BlackMisc::Simulation::IInterpolator::InterpolationStatus &interpolationStatus);
//! Send parts to sim
//! Send parts to simulator
bool sendRemoteAircraftPartsToSimulator(const CSimConnectObject &simObj, DataDefinitionRemoteAircraftParts &ddRemoteAircraftParts, const BlackMisc::Aviation::CAircraftLights &lights);
//! Called when data about our own aircraft are received

View File

@@ -55,8 +55,9 @@ namespace BlackSimPlugin
const DWORD sendId = exception->dwSendID;
const DWORD index = exception->dwIndex;
const DWORD data = cbData;
const QString exStr(CSimConnectUtilities::simConnectExceptionToString((SIMCONNECT_EXCEPTION)exception->dwException));
QString ex;
ex.sprintf("Exception=%lu SendID=%lu Index=%lu cbData=%lu", exceptionId, sendId, index, data);
ex.sprintf("Exception=%lu | SendID=%lu | Index=%lu | cbData=%lu", exceptionId, sendId, index, data);
switch (exceptionId)
{
case SIMCONNECT_EXCEPTION_OPERATION_INVALID_FOR_OBJECT_TYPE:
@@ -66,8 +67,7 @@ namespace BlackSimPlugin
default:
break;
}
CLogMessage(simulatorFsx).warning("Caught FSX simConnect exception: %1 %2")
<< CSimConnectUtilities::simConnectExceptionToString((SIMCONNECT_EXCEPTION)exception->dwException) << ex;
CLogMessage(simulatorFsx).warning("Caught FSX simConnect exception: %1 %2") << exStr << ex;
break;
}
case SIMCONNECT_RECV_ID_QUIT: