mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
[feature][XPlane] Set own aircraft model string when own aircraft changes.
Summary: Refactored parts of CAircraftModelLoaderXPlane::parseFlyableAirplanes into static method extractAcfProperties that can be called by xswiftbus. Used extractAcfProperties in xswiftbus to provide the model string to the driver. Implemented CSimulatorXPlane::ps_emitOwnAircraftModelChanged. Implements T74. Reviewers: rwinklmeier Reviewed By: rwinklmeier Subscribers: jenkins Tags: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D23
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "service.h"
|
||||
#include "blackmisc/simulation/xplane/aircraftmodelloaderxplane.h"
|
||||
#include <XPLM/XPLMPlanes.h>
|
||||
#include <XPLM/XPLMUtilities.h>
|
||||
#include <QDebug>
|
||||
@@ -31,7 +32,9 @@ namespace XSwiftBus
|
||||
char filename[256];
|
||||
char path[512];
|
||||
XPLMGetNthAircraftModel(XPLM_USER_AIRCRAFT, filename, path);
|
||||
emit aircraftModelChanged(path, filename, getAircraftLivery(), getAircraftIcaoCode());
|
||||
const auto model = BlackMisc::Simulation::XPlane::CAircraftModelLoaderXPlane::extractAcfProperties(path, QFileInfo(path));
|
||||
emit aircraftModelChanged(path, filename, getAircraftLivery(), getAircraftIcaoCode(),
|
||||
model.getModelString(), model.getName(), model.getDistributor().getDescription(), getAircraftDescription());
|
||||
}
|
||||
|
||||
void CService::addTextMessage(const QString &text, double red, double green, double blue)
|
||||
|
||||
Reference in New Issue
Block a user