mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #272 hacks to get traffic injection working with the current ISimulator interface;
temporary measure until ISimulator interface is refactored
This commit is contained in:
@@ -236,13 +236,15 @@ namespace BlackSimPlugin
|
||||
{
|
||||
if (! isConnected()) { return; }
|
||||
m_traffic->addPlane(callsign.asString(), type, "YYY", "YYY"); // TODO livery
|
||||
addAircraftSituation(callsign, initialSituation);
|
||||
//addAircraftSituation(callsign, initialSituation);
|
||||
m_planes.insert(callsign.asString()); // FIXME should not be needed here IMHO
|
||||
}
|
||||
|
||||
void CSimulatorXPlane::addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign,
|
||||
const BlackMisc::Aviation::CAircraftSituation &situ)
|
||||
{
|
||||
if (! isConnected()) { return; }
|
||||
if (! m_planes.contains(callsign.asString())) { addRemoteAircraft(callsign, "A320", situ); } // FIXME should not be needed here IMHO
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
m_traffic->setPlanePosition(callsign.asString(),
|
||||
situ.latitude().value(CAngleUnit::deg()),
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace BlackSimPlugin
|
||||
CXBusTrafficProxy *m_traffic { nullptr };
|
||||
QTimer *m_fastTimer { nullptr };
|
||||
QTimer *m_slowTimer { nullptr };
|
||||
QSet<QString> m_planes; // FIXME should not be needed here IMHO
|
||||
|
||||
struct // data is written by DBus async method callbacks
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user