mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T650, also remember SB offset setting
This commit is contained in:
@@ -72,7 +72,7 @@ namespace BlackSimPlugin
|
||||
const bool localSim = fsxOrP3D;
|
||||
if (fsxOrP3D)
|
||||
{
|
||||
ui->cb_TraceSimConnectCalls->setChecked(fsxOrP3D->isTracingSendId());
|
||||
ui->cb_TraceSimConnectCalls->setChecked(fsxOrP3D->isTraceSendId());
|
||||
ui->cb_EnableTerrainProbe->setChecked(fsxOrP3D->isUsingFsxTerrainProbe());
|
||||
ui->cb_SBOffsets->setChecked(fsxOrP3D->isUsingSbOffsetValues());
|
||||
ui->cb_UseFsuipc->setChecked(fsxOrP3D->isFsuipcOpened());
|
||||
|
||||
@@ -347,6 +347,15 @@ namespace BlackSimPlugin
|
||||
m_detailsSettings.setSettings(settings, sim);
|
||||
}
|
||||
|
||||
void CSimulatorFsxCommon::setUsingSbOffsetValues(bool enabled)
|
||||
{
|
||||
m_useSbOffsets = enabled;
|
||||
const CSimulatorInfo sim = this->getSimulatorInfo();
|
||||
CFsxP3DSettings settings = m_detailsSettings.getSettings(sim);
|
||||
settings.setSbOffsetsEnabled(enabled);
|
||||
m_detailsSettings.setSettings(settings, sim);
|
||||
}
|
||||
|
||||
void CSimulatorFsxCommon::resetAircraftStatistics()
|
||||
{
|
||||
m_dispatchProcCount = 0;
|
||||
@@ -449,7 +458,10 @@ namespace BlackSimPlugin
|
||||
if (referenceTs != m_simulatingChangedTs) { return; } // changed, so no longer valid
|
||||
m_simSimulating = true; // only place where this should be set to true
|
||||
m_simConnected = true;
|
||||
m_useAddSimulatedObj = m_detailsSettings.getSettings(this->getSimulatorInfo()).isAddingAsSimulatedObjectEnabled();
|
||||
|
||||
const CFsxP3DSettings settings = m_detailsSettings.getSettings(this->getSimulatorInfo());
|
||||
m_useAddSimulatedObj = settings.isAddingAsSimulatedObjectEnabled();
|
||||
m_useSbOffsets = settings.isSbOffsetsEnabled();
|
||||
|
||||
HRESULT hr1 = this->logAndTraceSendId(
|
||||
SimConnect_RequestDataOnSimObject(m_hSimConnect, CSimConnectDefinitions::RequestOwnAircraft,
|
||||
|
||||
@@ -159,9 +159,12 @@ namespace BlackSimPlugin
|
||||
//! \sa CSimulatorFsxCommon::is
|
||||
virtual bool requestElevation(const BlackMisc::Geo::ICoordinateGeodetic &reference, const BlackMisc::Aviation::CCallsign &aircraftCallsign) override;
|
||||
|
||||
//! Tracing?
|
||||
//! Tracing right now?
|
||||
bool isTracingSendId() const;
|
||||
|
||||
//! Trace enable (can be auto enable also)
|
||||
bool isTraceSendId() const { return m_traceSendId; }
|
||||
|
||||
//! Set tracing on/off
|
||||
void setTractingSendId(bool trace);
|
||||
|
||||
@@ -176,7 +179,7 @@ namespace BlackSimPlugin
|
||||
bool isUsingSbOffsetValues() const { return m_useSbOffsets; }
|
||||
|
||||
//! Use SB offset values
|
||||
void setUsingSbOffsetValues(bool use) { m_useSbOffsets = use; }
|
||||
void setUsingSbOffsetValues(bool use);
|
||||
|
||||
//! Number of received SB4 packets
|
||||
//! \remark if this is increasing, SB4 is supported
|
||||
|
||||
Reference in New Issue
Block a user