mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T298, adjusting used aircraft matcher (using setup)
This commit is contained in:
@@ -66,7 +66,6 @@ namespace BlackCore
|
||||
CContextSimulator::registerHelp();
|
||||
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Need sApp");
|
||||
// m_enableMatchingMessages = CBuildConfig::isLocalDeveloperDebugBuild() || sApp->isDeveloperFlagSet();
|
||||
m_enableMatchingMessages = true; // there seems to be no big disadavantage in always enabling it
|
||||
m_plugins->collectPlugins();
|
||||
this->restoreSimulatorPlugins();
|
||||
@@ -403,7 +402,7 @@ namespace BlackCore
|
||||
Q_UNUSED(c);
|
||||
|
||||
// Once the simulator signaled it is ready to simulate, add all known aircraft
|
||||
m_initallyAddAircrafts = true;
|
||||
m_initallyAddAircraft = true;
|
||||
m_matchingMessages.clear();
|
||||
|
||||
// try to connect to simulator
|
||||
@@ -548,7 +547,7 @@ namespace BlackCore
|
||||
|
||||
void CContextSimulator::onSimulatorStatusChanged(ISimulator::SimulatorStatus status)
|
||||
{
|
||||
if (m_initallyAddAircrafts && status.testFlag(ISimulator::Simulating))
|
||||
if (m_initallyAddAircraft && status.testFlag(ISimulator::Simulating))
|
||||
{
|
||||
// use network to initally add aircraft
|
||||
IContextNetwork *networkContext = this->getIContextNetwork();
|
||||
@@ -562,7 +561,7 @@ namespace BlackCore
|
||||
BLACK_VERIFY_X(!simulatedAircraft.getCallsign().isEmpty(), Q_FUNC_INFO, "Need callsign");
|
||||
this->xCtxAddedRemoteAircraftReadyForModelMatching(simulatedAircraft);
|
||||
}
|
||||
m_initallyAddAircrafts = false;
|
||||
m_initallyAddAircraft = false;
|
||||
}
|
||||
if (!status.testFlag(ISimulator::Connected))
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
//! Destructor
|
||||
virtual ~CContextSimulator();
|
||||
virtual ~CContextSimulator() override;
|
||||
|
||||
//! Gracefully shut down, e.g. for plugin unloading
|
||||
void gracefulShutdown();
|
||||
@@ -238,12 +238,12 @@ namespace BlackCore
|
||||
void initByLastUsedModelSet();
|
||||
|
||||
QPair<BlackMisc::Simulation::CSimulatorPluginInfo, QPointer<ISimulator>> m_simulatorPlugin; //!< Currently loaded simulator plugin
|
||||
CPluginManagerSimulator *m_plugins = nullptr;
|
||||
BlackMisc::CRegularThread m_listenersThread; //!< waiting for plugin
|
||||
CWeatherManager m_weatherManager { this };
|
||||
CAircraftMatcher m_aircraftMatcher; //!< Model matcher
|
||||
CPluginManagerSimulator *m_plugins = nullptr; //!< plugin manager
|
||||
BlackMisc::CRegularThread m_listenersThread; //!< waiting for plugin
|
||||
CWeatherManager m_weatherManager { this }; //!< weather management
|
||||
CAircraftMatcher m_aircraftMatcher { this }; //!< model matcher
|
||||
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_matchingMessages;
|
||||
bool m_initallyAddAircrafts = false;
|
||||
bool m_initallyAddAircraft = false;
|
||||
bool m_enableMatchingMessages = true;
|
||||
bool m_isWeatherActivated = false;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace BlackGui
|
||||
BlackMisc::Simulation::CAircraftModel defaultModel() const;
|
||||
|
||||
QScopedPointer<Ui::CModelMatcherComponent> ui;
|
||||
BlackCore::CAircraftMatcher m_matcher { BlackCore::CAircraftMatcher::All, this };
|
||||
BlackCore::CAircraftMatcher m_matcher { this }; //!< used matcher
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user