mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Style
This commit is contained in:
@@ -218,7 +218,7 @@ namespace BlackCore
|
||||
// do aircraft first, this will handle most callsigns
|
||||
for (const CSimulatedAircraft &aircraft : this->getAircraftInRange())
|
||||
{
|
||||
if (searchList.isEmpty()) break;
|
||||
if (searchList.isEmpty()) { break; }
|
||||
const CCallsign callsign = aircraft.getCallsign();
|
||||
if (searchList.contains(callsign))
|
||||
{
|
||||
@@ -230,7 +230,7 @@ namespace BlackCore
|
||||
|
||||
for (const CAtcStation &station : m_atcStationsOnline)
|
||||
{
|
||||
if (searchList.isEmpty()) break;
|
||||
if (searchList.isEmpty()) { break; }
|
||||
const CCallsign callsign = station.getCallsign();
|
||||
if (searchList.contains(callsign))
|
||||
{
|
||||
|
||||
@@ -197,6 +197,7 @@ namespace BlackCore
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::ISimulationEnvironmentProvider::requestElevation
|
||||
//! \remark needs to be overridden if the concrete driver supports such an option
|
||||
//! \sa ISimulator::callbackReceivedRequestedElevation
|
||||
virtual bool requestElevation(const BlackMisc::Geo::ICoordinateGeodetic &reference, const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
|
||||
//! Allows to print out simulator specific statistics
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace BlackCore
|
||||
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics total update time
|
||||
qint64 m_statsCurrentUpdateTimeMs = 0; //!< statistics current update time
|
||||
qint64 m_statsMaxUpdateTimeMs = 0; //!< statistics max.update time
|
||||
qint64 m_statsLastUpdateAircraftRequestedMs = 0; //!< when was the last aircraft update requested
|
||||
qint64 m_statsLastUpdateAircraftRequestedMs = 0; //!< when was the last aircraft update requested
|
||||
qint64 m_statsUpdateAircraftRequestedDeltaMs = 0; //!< delta time between 2 aircrat updates
|
||||
|
||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||
@@ -324,9 +324,9 @@ namespace BlackCore
|
||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||
QTimer m_oneSecondTimer; //!< multi purpose timer
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||
BlackMisc::CConnectionGuard m_remoteAircraftProviderConnections; //!< connected signal/slots
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||
BlackMisc::CConnectionGuard m_remoteAircraftProviderConnections; //!< connected signal/slots
|
||||
|
||||
// statistics values of how often those functions are called
|
||||
// those are the added counters, overflow will not be an issue here (discussed in T171 review)
|
||||
|
||||
@@ -366,7 +366,6 @@ namespace BlackMisc
|
||||
|
||||
bool CAircraftSituation::guessOnGround(const CAircraftSituationChange &change, const CAircraftModel &model)
|
||||
{
|
||||
Q_UNUSED(change);
|
||||
if (!this->shouldGuessOnGround()) { return false; }
|
||||
|
||||
// for debugging purposed
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/variant.h"
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
#include <tuple>
|
||||
@@ -157,7 +156,7 @@ namespace BlackMisc
|
||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||
|
||||
//! Compare for index
|
||||
//! \copydoc BlackMisc::Mixin::Index::comparePropertyByIndex
|
||||
int comparePropertyByIndex(const CPropertyIndex &index, const CCallsign &compareValue) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString()
|
||||
|
||||
@@ -8,38 +8,36 @@
|
||||
*/
|
||||
|
||||
#include "registermetadata.h"
|
||||
#include "blackmisc/applicationinfolist.h"
|
||||
#include "blackmisc/simulation/registermetadatasimulation.h"
|
||||
#include "blackmisc/weather/registermetadataweather.h"
|
||||
#include "blackmisc/network/registermetadatanetwork.h"
|
||||
#include "blackmisc/db/registermetadatadb.h"
|
||||
#include "blackmisc/audio/registermetadataaudio.h"
|
||||
#include "blackmisc/aviation/registermetadataaviation.h"
|
||||
#include "blackmisc/input/registermetadatainput.h"
|
||||
#include "blackmisc/geo/registermetadatageo.h"
|
||||
#include "blackmisc/pq/registermetadatapq.h"
|
||||
#include "blackmisc/applicationinfolist.h"
|
||||
#include "blackmisc/countrylist.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include "blackmisc/db/registermetadatadb.h"
|
||||
#include "blackmisc/geo/registermetadatageo.h"
|
||||
#include "blackmisc/iconlist.h"
|
||||
#include "blackmisc/identifierlist.h"
|
||||
#include "blackmisc/input/registermetadatainput.h"
|
||||
#include "blackmisc/logcategory.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
#include "blackmisc/logpattern.h"
|
||||
#include "blackmisc/namevariantpair.h"
|
||||
#include "blackmisc/namevariantpairlist.h"
|
||||
#include "blackmisc/network/registermetadatanetwork.h"
|
||||
#include "blackmisc/pixmap.h"
|
||||
#include "blackmisc/platformset.h"
|
||||
#include "blackmisc/pq/registermetadatapq.h"
|
||||
#include "blackmisc/processinfo.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/propertyindexlist.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
#include "blackmisc/rgbcolor.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/simulation/registermetadatasimulation.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/valuecache.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/variantlist.h"
|
||||
#include "blackmisc/variantmap.h"
|
||||
#include "blackmisc/weather/registermetadataweather.h"
|
||||
|
||||
#include <QDBusMetaType>
|
||||
#include <QMetaType>
|
||||
|
||||
@@ -1372,6 +1372,7 @@ namespace BlackSimPlugin
|
||||
const CCallsign callsign(simObject.getCallsign());
|
||||
Q_ASSERT_X(!callsign.isEmpty(), Q_FUNC_INFO, "missing callsign");
|
||||
Q_ASSERT_X(simObject.hasValidRequestAndObjectId(), Q_FUNC_INFO, "Missing ids");
|
||||
const DWORD objectId = simObject.getObjectId();
|
||||
|
||||
// setup
|
||||
const CInterpolationAndRenderingSetupPerCallsign setup = this->getInterpolationSetupConsolidated(callsign);
|
||||
@@ -1385,26 +1386,26 @@ namespace BlackSimPlugin
|
||||
if (!this->isEqualLastSent(result))
|
||||
{
|
||||
SIMCONNECT_DATA_INITPOSITION position = this->aircraftSituationToFsxPosition(result, sendGround);
|
||||
m_simConnectObjects[simObject.getCallsign()].setPositionAsSent(position);
|
||||
m_simConnectObjects[callsign].setPositionAsSent(position);
|
||||
const HRESULT hr = SimConnect_SetDataOnSimObject(m_hSimConnect, CSimConnectDefinitions::DataRemoteAircraftSetPosition,
|
||||
static_cast<SIMCONNECT_OBJECT_ID>(simObject.getObjectId()), 0, 0,
|
||||
static_cast<SIMCONNECT_OBJECT_ID>(objectId), 0, 0,
|
||||
sizeof(SIMCONNECT_DATA_INITPOSITION), &position);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
this->rememberLastSent(result); // remember
|
||||
if (this->isTracingSendId()) { this->traceSendId(simObject.getObjectId(), Q_FUNC_INFO); }
|
||||
if (this->isTracingSendId()) { this->traceSendId(objectId, Q_FUNC_INFO); }
|
||||
this->removedClampedLog(callsign);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).warning("Failed so set position on SimObject '%1' callsign: '%2'") << simObject.getObjectId() << callsign;
|
||||
CLogMessage(this).warning("Failed so set position on SimObject '%1' callsign: '%2'") << objectId << callsign;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static const QString so("SimObject id: %1");
|
||||
const QString msg = this->getInvalidSituationLogMessage(callsign, result.getInterpolationStatus(), so.arg(simObject.getObjectId()));
|
||||
const QString msg = this->getInvalidSituationLogMessage(callsign, result.getInterpolationStatus(), so.arg(objectId));
|
||||
const CStatusMessage sm(this, CStatusMessage::SeverityWarning, msg);
|
||||
this->clampedLog(callsign, sm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user