mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
refs #452 updated drivers
* FSX/FS9 directories directly resolved in parser * all: using BlackMisc::Simulation::CSimulatedAircraft instead of CAircraft
This commit is contained in:
committed by
Mathew Sutcliffe
parent
dbcc540313
commit
a8e8e5527a
@@ -18,7 +18,6 @@
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/aircraftmappinglist.h"
|
||||
#include "blackmisc/simulation/fscommon/fscommonutil.h"
|
||||
|
||||
#include <QTimer>
|
||||
@@ -44,8 +43,7 @@ namespace BlackSimPlugin
|
||||
IRemoteAircraftProvider *remoteAircraftProvider,
|
||||
IPluginStorageProvider *pluginStorageProvider,
|
||||
QObject *parent) :
|
||||
CSimulatorFsCommon(info, ownAircraftProvider, remoteAircraftProvider, pluginStorageProvider,
|
||||
simObjectsDir(), excludeDirectories(), parent)
|
||||
CSimulatorFsCommon(info, ownAircraftProvider, remoteAircraftProvider, pluginStorageProvider, parent)
|
||||
{
|
||||
Q_ASSERT(ownAircraftProvider);
|
||||
Q_ASSERT(remoteAircraftProvider);
|
||||
@@ -57,7 +55,7 @@ namespace BlackSimPlugin
|
||||
"Boeing 737-800 Paint1",
|
||||
CAircraftModel::TypeModelMatchingDefaultModel,
|
||||
"B737-800 default model",
|
||||
CAircraftIcaoData(CAircraftIcaoCode("B738", "L2J"), CAirlineIcaoCode())
|
||||
CAircraftIcaoCode("B738", "L2J")
|
||||
));
|
||||
}
|
||||
|
||||
@@ -179,7 +177,7 @@ namespace BlackSimPlugin
|
||||
return rendered;
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::updateOwnSimulatorCockpit(const CAircraft &ownAircraft, const CIdentifier &originator)
|
||||
bool CSimulatorFsx::updateOwnSimulatorCockpit(const CSimulatedAircraft &ownAircraft, const CIdentifier &originator)
|
||||
{
|
||||
if (originator == this->identifier()) { return false; }
|
||||
if (!this->isSimulating()) { return false; }
|
||||
@@ -825,26 +823,6 @@ namespace BlackSimPlugin
|
||||
}
|
||||
}
|
||||
|
||||
QString CSimulatorFsx::simObjectsDir()
|
||||
{
|
||||
QString dir = CFsCommonUtil::fsxSimObjectsDirFromRegistry();
|
||||
if (!dir.isEmpty()) { return dir; }
|
||||
return "P:/FlightSimulatorX (MSI)/SimObjects";
|
||||
// "p:/temp/SimObjects"
|
||||
}
|
||||
|
||||
const QStringList &CSimulatorFsx::excludeDirectories()
|
||||
{
|
||||
static const QStringList exclude
|
||||
{
|
||||
"SimObjects/Animals",
|
||||
"SimObjects/Misc",
|
||||
"SimObjects/GroundVehicles",
|
||||
"SimObjects/Boats"
|
||||
};
|
||||
return exclude;
|
||||
}
|
||||
|
||||
CSimulatorFsxListener::CSimulatorFsxListener(const CSimulatorPluginInfo &info) :
|
||||
ISimulatorListener(info),
|
||||
m_timer(new QTimer(this))
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace BlackSimPlugin
|
||||
virtual int physicallyRemoveAllRemoteAircraft() override;
|
||||
|
||||
//! \copydoc ISimulator::updateOwnCockpit
|
||||
virtual bool updateOwnSimulatorCockpit(const BlackMisc::Aviation::CAircraft &ownAircraft, const BlackMisc::CIdentifier &originator) override;
|
||||
virtual bool updateOwnSimulatorCockpit(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! \copydoc ISimulator::displayStatusMessage
|
||||
virtual void displayStatusMessage(const BlackMisc::CStatusMessage &message) const override;
|
||||
@@ -179,13 +179,6 @@ namespace BlackSimPlugin
|
||||
//! Sync time with user's computer
|
||||
void synchronizeTime(const BlackMisc::PhysicalQuantities::CTime &zuluTimeSim, const BlackMisc::PhysicalQuantities::CTime &localTimeSim);
|
||||
|
||||
//! SimObjects directory
|
||||
//! \todo Read from settings if registry fails
|
||||
static QString simObjectsDir();
|
||||
|
||||
//! Do not include the following directories for FS
|
||||
static const QStringList &excludeDirectories();
|
||||
|
||||
static const int SkipUpdateCyclesForCockpit = 10; //!< skip x cycles before updating cockpit again
|
||||
bool m_simConnected = false; //!< Is simulator connected?
|
||||
bool m_simSimulating = false; //!< Simulator running?
|
||||
|
||||
Reference in New Issue
Block a user