mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:48:20 +08:00
Ref T554, changed signature to pass model (object) and not only modelstring
Allows to test if data have changed before "remembering them for auto publish"
This commit is contained in:
committed by
Mat Sutcliffe
parent
f87004c6c8
commit
fab65c23b1
@@ -51,6 +51,9 @@ namespace BlackSimPlugin
|
||||
//! Simulated aircraft model string
|
||||
const QString &getAircraftModelString() const { return m_aircraft.getModelString(); }
|
||||
|
||||
//! Simulated aircraft model
|
||||
const BlackMisc::Simulation::CAircraftModel &getAircraftModel() const { return m_aircraft.getModel(); }
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolatorInfo
|
||||
QString getInterpolatorInfo(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@ namespace BlackSimPlugin
|
||||
const CLength cg = std::isnan(cgValue) ?
|
||||
CLength::null() :
|
||||
CLength(cgValue, CLengthUnit::m(), CLengthUnit::ft());
|
||||
this->rememberElevationAndSimulatorCG(cs, fgAircraft.getAircraftModelString(), elevation, cg);
|
||||
this->rememberElevationAndSimulatorCG(cs, fgAircraft.getAircraftModel(), elevation, cg);
|
||||
|
||||
// loopback
|
||||
if (logCallsigns.contains(cs))
|
||||
|
||||
@@ -814,7 +814,7 @@ namespace BlackSimPlugin
|
||||
if (remoteAircraftData.aboveGroundFt() < 250)
|
||||
{
|
||||
const CLength cg(remoteAircraftData.cgToGroundFt, CLengthUnit::ft());
|
||||
this->rememberElevationAndSimulatorCG(cs, simObject.getAircraftModelString(), elevation, cg);
|
||||
this->rememberElevationAndSimulatorCG(cs, simObject.getAircraftModel(), elevation, cg);
|
||||
}
|
||||
|
||||
const bool log = this->isLogCallsign(cs);
|
||||
@@ -864,7 +864,7 @@ namespace BlackSimPlugin
|
||||
so.setAircraftModelString(modelString);
|
||||
|
||||
// update in 2 providers
|
||||
this->rememberElevationAndSimulatorCG(cs, modelString, CElevationPlane::null(), cg); // env. provider
|
||||
this->rememberElevationAndSimulatorCG(cs, simObject.getAircraftModel(), CElevationPlane::null(), cg); // env. provider
|
||||
this->updateCGAndModelString(cs, cg, modelString); // remote aircraft provider
|
||||
}
|
||||
|
||||
|
||||
@@ -1005,7 +1005,7 @@ namespace BlackSimPlugin
|
||||
const CLength cg = std::isnan(cgValue) ?
|
||||
CLength::null() :
|
||||
CLength(cgValue, CLengthUnit::m(), CLengthUnit::ft());
|
||||
this->rememberElevationAndSimulatorCG(cs, xpAircraft.getAircraftModelString(), elevation, cg);
|
||||
this->rememberElevationAndSimulatorCG(cs, xpAircraft.getAircraftModel(), elevation, cg);
|
||||
|
||||
// loopback
|
||||
if (logCallsigns.contains(cs))
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace BlackSimPlugin
|
||||
//! Simulated aircraft (as added)
|
||||
const BlackMisc::Simulation::CSimulatedAircraft &getAircraft() const { return m_aircraft; }
|
||||
|
||||
//! Simulated aircraft model
|
||||
const BlackMisc::Simulation::CAircraftModel &getAircraftModel() const { return m_aircraft.getModel(); }
|
||||
|
||||
//! Simulated aircraft model string
|
||||
const QString &getAircraftModelString() const { return m_aircraft.getModelString(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user