mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
[AFV] Utility functions to update simulator settings
This commit is contained in:
committed by
Mat Sutcliffe
parent
124432ceb1
commit
63cc2a7e3e
@@ -17,6 +17,7 @@
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackCore
|
||||
@@ -61,6 +62,25 @@ namespace BlackCore
|
||||
return static_cast<ISimulator::SimulatorStatus>(this->getSimulatorStatus());
|
||||
}
|
||||
|
||||
CSimulatorInfo IContextSimulator::getSimulatorInfo() const
|
||||
{
|
||||
return this->getSimulatorPluginInfo().getSimulatorInfo();
|
||||
}
|
||||
|
||||
bool IContextSimulator::updateCurrentSettings(const Simulation::Settings::CSimulatorSettings &settings)
|
||||
{
|
||||
const CSimulatorInfo sim = this->getSimulatorInfo();
|
||||
if (!sim.isSingleSimulator()) { return false; }
|
||||
return this->setSimulatorSettings(settings, sim);
|
||||
}
|
||||
|
||||
bool IContextSimulator::updateCurrentSettingComIntegration(bool comIntegration)
|
||||
{
|
||||
Simulation::Settings::CSimulatorSettings settings = this->getSimulatorSettings();
|
||||
settings.setComIntegrated(comIntegration);
|
||||
return this->updateCurrentSettings(settings);
|
||||
}
|
||||
|
||||
bool IContextSimulator::isSimulatorAvailable() const
|
||||
{
|
||||
return CBuildConfig::isCompiledWithFlightSimulatorSupport() && !this->getSimulatorPluginInfo().isUnspecified();
|
||||
|
||||
Reference in New Issue
Block a user