refs #852 Extend xbus traffic service to maintain a CAircraftPartsList with onGround flags.

This commit is contained in:
Mathew Sutcliffe
2017-01-09 18:49:09 +00:00
parent 8a924d5b1c
commit c9b1647e72
5 changed files with 27 additions and 14 deletions

View File

@@ -521,9 +521,10 @@ namespace BlackSimPlugin
void CSimulatorXPlane::ps_remoteProviderAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftParts &parts)
{
Q_ASSERT(isConnected());
m_traffic->setPlaneSurfaces(callsign.asString(), true, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, true, true, true, 0); // TODO landing gear, lights, control surfaces
m_traffic->setPlaneTransponder(callsign.asString(), 2000, true, false); // TODO transponder
Q_UNUSED(parts); // TODO
//! \fixme Parts currently not used by libxplanemp
m_traffic->addPlaneSurfaces(callsign.asString(), true, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, true, true, true, 0, parts.isOnGround(),
parts.getAdjustedMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch());
m_traffic->setPlaneTransponder(callsign.asString(), 2000, true, false);
}
void CSimulatorXPlane::ps_remoteProviderRemovedAircraft(const CCallsign &callsign)

View File

@@ -91,11 +91,11 @@ namespace BlackSimPlugin
m_dbusInterface->callDBus(QLatin1String("addPlanePosition"), callsign, latitude, longitude, altitude, pitch, roll, heading, relativeTime);
}
void CXBusTrafficProxy::setPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern)
void CXBusTrafficProxy::addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime)
{
m_dbusInterface->callDBus(QLatin1String("setPlaneSurfaces"), callsign, gear, flap, spoiler, speedBrake, slat, wingSweep, thrust, elevator, rudder, aileron,
landLight, beaconLight, strobeLight, navLight, lightPattern);
m_dbusInterface->callDBus(QLatin1String("addPlaneSurfaces"), callsign, gear, flap, spoiler, speedBrake, slat, wingSweep, thrust, elevator, rudder, aileron,
landLight, beaconLight, strobeLight, navLight, lightPattern, onGround, relativeTime);
}
void CXBusTrafficProxy::setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident)

View File

@@ -105,9 +105,9 @@ namespace BlackSimPlugin
//! \copydoc XBus::CTraffic::addPlanePosition
void addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime);
//! \copydoc XBus::CTraffic::setPlaneSurfaces
void setPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern);
//! \copydoc XBus::CTraffic::addPlaneSurfaces
void addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime);
//! \copydoc XBus::CTraffic::setPlaneTransponder
void setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident);