mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
[XSwiftBus] Set transponder info for all rendered aircraft
Without setting the transponder, no TCAS rendering is possible. ref T374
This commit is contained in:
committed by
Klaus Basan
parent
616cc241f4
commit
c72742029b
@@ -768,6 +768,7 @@ namespace BlackSimPlugin
|
||||
|
||||
PlanesPositions planesPositions;
|
||||
PlanesSurfaces planesSurfaces;
|
||||
PlanesTransponders planesTransponders;
|
||||
|
||||
int aircraftNumber = 0;
|
||||
for (const CXPlaneMPAircraft &xplaneAircraft : xplaneAircraftList)
|
||||
@@ -775,6 +776,12 @@ namespace BlackSimPlugin
|
||||
const CCallsign callsign(xplaneAircraft.getCallsign());
|
||||
Q_ASSERT_X(!callsign.isEmpty(), Q_FUNC_INFO, "missing callsign");
|
||||
|
||||
planesTransponders.callsigns.push_back(callsign.asString());
|
||||
planesTransponders.codes.push_back(xplaneAircraft.getAircraft().getTransponderCode());
|
||||
CTransponder::TransponderMode transponderMode = xplaneAircraft.getAircraft().getTransponderMode();
|
||||
planesTransponders.idents.push_back(transponderMode == CTransponder::StateIdent);
|
||||
planesTransponders.modeCs.push_back(transponderMode == CTransponder::ModeC);
|
||||
|
||||
// setup
|
||||
const CInterpolationAndRenderingSetupPerCallsign setup = this->getInterpolationSetupConsolidated(callsign);
|
||||
|
||||
@@ -830,6 +837,11 @@ namespace BlackSimPlugin
|
||||
|
||||
} // all callsigns
|
||||
|
||||
if (!planesTransponders.isEmpty())
|
||||
{
|
||||
m_trafficProxy->setPlanesTransponders(planesTransponders);
|
||||
}
|
||||
|
||||
if (!planesPositions.isEmpty())
|
||||
{
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
|
||||
@@ -93,10 +93,10 @@ namespace BlackSimPlugin
|
||||
//! Is empty?
|
||||
bool isEmpty() const { return callsigns.isEmpty(); }
|
||||
|
||||
QStringList callsigns;
|
||||
QList<int> codes;
|
||||
QList<bool> modeCs;
|
||||
QList<bool> idents;
|
||||
QStringList callsigns; //!< List of callsigns
|
||||
QList<int> codes; //!< List of transponder codes
|
||||
QList<bool> modeCs; //!< List of active mode C's
|
||||
QList<bool> idents; //!< List of active idents
|
||||
};
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user