mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +08:00
Ref T261, adjusted interpolation setup
* removed "IndexEnableGndFlag" as this is actually part of FSD network settings * renamed to "isForcingVtolInterpolation" * adjusted interpolator, and UI for setup
This commit is contained in:
@@ -40,8 +40,7 @@ namespace BlackGui
|
|||||||
ui->cb_DebugDriver->setChecked(setup.showSimulatorDebugMessages());
|
ui->cb_DebugDriver->setChecked(setup.showSimulatorDebugMessages());
|
||||||
ui->cb_LogInterpolation->setChecked(setup.logInterpolation());
|
ui->cb_LogInterpolation->setChecked(setup.logInterpolation());
|
||||||
ui->cb_EnableParts->setChecked(setup.isAircraftPartsEnabled());
|
ui->cb_EnableParts->setChecked(setup.isAircraftPartsEnabled());
|
||||||
ui->cb_ForceFullInterpolation->setChecked(setup.isForcingFullInterpolation());
|
ui->cb_ForceVtolInterpolation->setChecked(setup.isForcingVtolInterpolation());
|
||||||
ui->cb_EnableGndFlag->setChecked(setup.isGndFlagEnabled());
|
|
||||||
ui->cb_SendGndFlagToSim->setChecked(setup.isSendingGndFlagToSimulator());
|
ui->cb_SendGndFlagToSim->setChecked(setup.isSendingGndFlagToSimulator());
|
||||||
ui->cb_FixSceneryOffset->setChecked(setup.isFixingSceneryOffset());
|
ui->cb_FixSceneryOffset->setChecked(setup.isFixingSceneryOffset());
|
||||||
|
|
||||||
@@ -54,8 +53,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
CInterpolationAndRenderingSetupPerCallsign setup;
|
CInterpolationAndRenderingSetupPerCallsign setup;
|
||||||
setup.setEnabledAircraftParts(ui->cb_EnableParts->isChecked());
|
setup.setEnabledAircraftParts(ui->cb_EnableParts->isChecked());
|
||||||
setup.setEnabledGndFLag(ui->cb_EnableGndFlag->isChecked());
|
setup.setForceVtolInterpolation(ui->cb_ForceVtolInterpolation->isChecked());
|
||||||
setup.setForceFullInterpolation(ui->cb_ForceFullInterpolation->isChecked());
|
|
||||||
setup.setLogInterpolation(ui->cb_LogInterpolation->isChecked());
|
setup.setLogInterpolation(ui->cb_LogInterpolation->isChecked());
|
||||||
setup.setSendingGndFlagToSimulator(ui->cb_SendGndFlagToSim->isChecked());
|
setup.setSendingGndFlagToSimulator(ui->cb_SendGndFlagToSim->isChecked());
|
||||||
setup.setSimulatorDebuggingMessages(ui->cb_DebugDriver->isChecked());
|
setup.setSimulatorDebuggingMessages(ui->cb_DebugDriver->isChecked());
|
||||||
@@ -69,8 +67,7 @@ namespace BlackGui
|
|||||||
CGuiUtility::checkBoxReadOnly(ui->cb_DebugDriver, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_DebugDriver, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_LogInterpolation, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_LogInterpolation, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_EnableParts, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_EnableParts, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_ForceFullInterpolation, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_ForceVtolInterpolation, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_EnableGndFlag, readonly);
|
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_SendGndFlagToSim, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_SendGndFlagToSim, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_FixSceneryOffset, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_FixSceneryOffset, readonly);
|
||||||
ui->co_InterpolatorMode->setEnabled(!readonly);
|
ui->co_InterpolatorMode->setEnabled(!readonly);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>236</width>
|
<width>240</width>
|
||||||
<height>102</height>
|
<height>102</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -42,7 +42,34 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="cb_SendGndFlagToSim">
|
||||||
|
<property name="text">
|
||||||
|
<string>send gnd.to simulator</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="cb_ForceVtolInterpolation">
|
||||||
|
<property name="text">
|
||||||
|
<string>force VTOL interpolation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_FixSceneryOffset">
|
||||||
|
<property name="text">
|
||||||
|
<string>fix scenery offset</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="cb_EnableParts">
|
<widget class="QCheckBox" name="cb_EnableParts">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>enable parts</string>
|
<string>enable parts</string>
|
||||||
@@ -52,34 +79,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="cb_EnableGndFlag">
|
|
||||||
<property name="text">
|
|
||||||
<string>use (network) gnd.flag</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="cb_SendGndFlagToSim">
|
|
||||||
<property name="text">
|
|
||||||
<string>send gnd.to simulator</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="cb_ForceFullInterpolation">
|
|
||||||
<property name="text">
|
|
||||||
<string>force full interpolation</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="cb_FixSceneryOffset">
|
|
||||||
<property name="text">
|
|
||||||
<string>fix scenery offset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
@@ -27,10 +27,9 @@ namespace BlackGui
|
|||||||
m_columns.addColumn(CColumn::standardValueObject("cs.", "callsign", CInterpolationAndRenderingSetupPerCallsign::IndexCallsign, CCallsign::IndexCallsignString));
|
m_columns.addColumn(CColumn::standardValueObject("cs.", "callsign", CInterpolationAndRenderingSetupPerCallsign::IndexCallsign, CCallsign::IndexCallsignString));
|
||||||
this->m_columns.addColumn(CColumn::standardString("interpolator", CInterpolationAndRenderingSetupPerCallsign::IndexInterpolatorModeAsString));
|
this->m_columns.addColumn(CColumn::standardString("interpolator", CInterpolationAndRenderingSetupPerCallsign::IndexInterpolatorModeAsString));
|
||||||
m_columns.addColumn(CColumn("parts", "aircraft parts", CInterpolationAndRenderingSetupPerCallsign::IndexEnabledAircraftParts, new CBoolIconFormatter("parts", "aircraft parts")));
|
m_columns.addColumn(CColumn("parts", "aircraft parts", CInterpolationAndRenderingSetupPerCallsign::IndexEnabledAircraftParts, new CBoolIconFormatter("parts", "aircraft parts")));
|
||||||
m_columns.addColumn(CColumn("en.gnd.", "enable gnd (network)", CInterpolationAndRenderingSetupPerCallsign::IndexEnableGndFlag, new CBoolIconFormatter("en.gnd.", "enable gnd.")));
|
|
||||||
m_columns.addColumn(CColumn("send gnd.", "send gnd.", CInterpolationAndRenderingSetupPerCallsign::IndexSendGndFlagToSimulator, new CBoolIconFormatter("send gnd.", "send gnd.")));
|
m_columns.addColumn(CColumn("send gnd.", "send gnd.", CInterpolationAndRenderingSetupPerCallsign::IndexSendGndFlagToSimulator, new CBoolIconFormatter("send gnd.", "send gnd.")));
|
||||||
m_columns.addColumn(CColumn("sc.os.", "fix scenery offset", CInterpolationAndRenderingSetupPerCallsign::IndexFixSceneryOffset, new CBoolIconFormatter("sc.os.", "fix scenery offset")));
|
m_columns.addColumn(CColumn("sc.os.", "fix scenery offset", CInterpolationAndRenderingSetupPerCallsign::IndexFixSceneryOffset, new CBoolIconFormatter("sc.os.", "fix scenery offset")));
|
||||||
m_columns.addColumn(CColumn("full", "full int.", CInterpolationAndRenderingSetupPerCallsign::IndexForceFullInterpolation, new CBoolIconFormatter("full", "full int.")));
|
m_columns.addColumn(CColumn("VTOL", "VTOL interpolstion", CInterpolationAndRenderingSetupPerCallsign::IndexForceVtolInterpolation, new CBoolIconFormatter("VTOL", "VTOL interpolation")));
|
||||||
m_columns.addColumn(CColumn("sim.dbg.", "simulator debug", CInterpolationAndRenderingSetupPerCallsign::IndexSimulatorDebugMessages, new CBoolIconFormatter("sim.dbg.", "simulator debug")));
|
m_columns.addColumn(CColumn("sim.dbg.", "simulator debug", CInterpolationAndRenderingSetupPerCallsign::IndexSimulatorDebugMessages, new CBoolIconFormatter("sim.dbg.", "simulator debug")));
|
||||||
m_columns.addColumn(CColumn("log.int.", "log.interpolation", CInterpolationAndRenderingSetupPerCallsign::IndexLogInterpolation, new CBoolIconFormatter("log.int.", "log.interpolation")));
|
m_columns.addColumn(CColumn("log.int.", "log.interpolation", CInterpolationAndRenderingSetupPerCallsign::IndexLogInterpolation, new CBoolIconFormatter("log.int.", "log.interpolation")));
|
||||||
// default sort order
|
// default sort order
|
||||||
|
|||||||
@@ -24,13 +24,6 @@ namespace BlackMisc
|
|||||||
CInterpolationAndRenderingSetupBase::CInterpolationAndRenderingSetupBase()
|
CInterpolationAndRenderingSetupBase::CInterpolationAndRenderingSetupBase()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool CInterpolationAndRenderingSetupBase::setEnabledGndFLag(bool enabled)
|
|
||||||
{
|
|
||||||
if (enabled == m_enabledGndFlag) { return false; }
|
|
||||||
m_enabledGndFlag = enabled;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CInterpolationAndRenderingSetupBase::setSendingGndFlagToSimulator(bool sendFLag)
|
bool CInterpolationAndRenderingSetupBase::setSendingGndFlagToSimulator(bool sendFLag)
|
||||||
{
|
{
|
||||||
if (sendFLag == m_sendGndToSim) { return false; }
|
if (sendFLag == m_sendGndToSim) { return false; }
|
||||||
@@ -91,9 +84,8 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
case IndexLogInterpolation: return CVariant::fromValue(m_logInterpolation);
|
case IndexLogInterpolation: return CVariant::fromValue(m_logInterpolation);
|
||||||
case IndexSimulatorDebugMessages: return CVariant::fromValue(m_simulatorDebugMessages);
|
case IndexSimulatorDebugMessages: return CVariant::fromValue(m_simulatorDebugMessages);
|
||||||
case IndexForceFullInterpolation: return CVariant::fromValue(m_forceFullInterpolation);
|
case IndexForceVtolInterpolation: return CVariant::fromValue(m_forceVtolInterpolation);
|
||||||
case IndexEnabledAircraftParts: return CVariant::fromValue(m_enabledAircraftParts);
|
case IndexEnabledAircraftParts: return CVariant::fromValue(m_enabledAircraftParts);
|
||||||
case IndexEnableGndFlag: return CVariant::fromValue(m_enabledGndFlag);
|
|
||||||
case IndexSendGndFlagToSimulator: return CVariant::fromValue(m_sendGndToSim);
|
case IndexSendGndFlagToSimulator: return CVariant::fromValue(m_sendGndToSim);
|
||||||
case IndexInterpolatorMode: return CVariant::fromValue(m_interpolatorMode);
|
case IndexInterpolatorMode: return CVariant::fromValue(m_interpolatorMode);
|
||||||
case IndexInterpolatorModeAsString: return CVariant::fromValue(this->getInterpolatorModeAsString());
|
case IndexInterpolatorModeAsString: return CVariant::fromValue(this->getInterpolatorModeAsString());
|
||||||
@@ -111,9 +103,8 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
case IndexLogInterpolation: m_logInterpolation = variant.toBool(); return;
|
case IndexLogInterpolation: m_logInterpolation = variant.toBool(); return;
|
||||||
case IndexSimulatorDebugMessages: m_simulatorDebugMessages = variant.toBool(); return;
|
case IndexSimulatorDebugMessages: m_simulatorDebugMessages = variant.toBool(); return;
|
||||||
case IndexForceFullInterpolation: m_forceFullInterpolation = variant.toBool(); return;
|
case IndexForceVtolInterpolation: m_forceVtolInterpolation = variant.toBool(); return;
|
||||||
case IndexEnabledAircraftParts: m_enabledAircraftParts = variant.toBool(); return;
|
case IndexEnabledAircraftParts: m_enabledAircraftParts = variant.toBool(); return;
|
||||||
case IndexEnableGndFlag: m_enabledGndFlag = variant.toBool(); return;
|
|
||||||
case IndexSendGndFlagToSimulator: m_sendGndToSim = variant.toBool(); return;
|
case IndexSendGndFlagToSimulator: m_sendGndToSim = variant.toBool(); return;
|
||||||
case IndexInterpolatorMode: m_interpolatorMode = variant.toInt(); return;
|
case IndexInterpolatorMode: m_interpolatorMode = variant.toInt(); return;
|
||||||
case IndexInterpolatorModeAsString: this->setInterpolatorMode(variant.toQString()); return;
|
case IndexInterpolatorModeAsString: this->setInterpolatorMode(variant.toQString()); return;
|
||||||
@@ -130,9 +121,8 @@ namespace BlackMisc
|
|||||||
QStringLiteral("Interpolator: ") % this->getInterpolatorModeAsString() %
|
QStringLiteral("Interpolator: ") % this->getInterpolatorModeAsString() %
|
||||||
QStringLiteral(" | Dbg.sim.msgs: ") % boolToYesNo(m_simulatorDebugMessages) %
|
QStringLiteral(" | Dbg.sim.msgs: ") % boolToYesNo(m_simulatorDebugMessages) %
|
||||||
QStringLiteral(" | log interpolation: ") % boolToYesNo(m_logInterpolation) %
|
QStringLiteral(" | log interpolation: ") % boolToYesNo(m_logInterpolation) %
|
||||||
QStringLiteral(" | force full interpolation: ") % boolToYesNo(m_forceFullInterpolation) %
|
QStringLiteral(" | force VTOL interpolation: ") % boolToYesNo(m_forceVtolInterpolation) %
|
||||||
QStringLiteral(" | enable parts: ") % boolToYesNo(m_enabledAircraftParts) %
|
QStringLiteral(" | enable parts: ") % boolToYesNo(m_enabledAircraftParts) %
|
||||||
QStringLiteral(" | enable gnd: ") % boolToYesNo(m_enabledGndFlag) %
|
|
||||||
QStringLiteral(" | send gnd: ") % boolToYesNo(m_sendGndToSim) %
|
QStringLiteral(" | send gnd: ") % boolToYesNo(m_sendGndToSim) %
|
||||||
QStringLiteral(" | fix.scenery offset: ") % boolToYesNo(m_fixSceneryOffset);
|
QStringLiteral(" | fix.scenery offset: ") % boolToYesNo(m_fixSceneryOffset);
|
||||||
}
|
}
|
||||||
@@ -255,10 +245,11 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
m_logInterpolation = baseValues.logInterpolation();
|
m_logInterpolation = baseValues.logInterpolation();
|
||||||
m_simulatorDebugMessages = baseValues.showSimulatorDebugMessages();
|
m_simulatorDebugMessages = baseValues.showSimulatorDebugMessages();
|
||||||
m_forceFullInterpolation = baseValues.isForcingFullInterpolation();
|
m_forceVtolInterpolation = baseValues.isForcingVtolInterpolation();
|
||||||
m_enabledAircraftParts = baseValues.isAircraftPartsEnabled();
|
m_enabledAircraftParts = baseValues.isAircraftPartsEnabled();
|
||||||
m_enabledGndFlag = baseValues.isGndFlagEnabled();
|
|
||||||
m_sendGndToSim = baseValues.isSendingGndFlagToSimulator();
|
m_sendGndToSim = baseValues.isSendingGndFlagToSimulator();
|
||||||
|
m_fixSceneryOffset = baseValues.isFixingSceneryOffset();
|
||||||
|
m_interpolatorMode = baseValues.getInterpolatorMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CInterpolationAndRenderingSetupGlobal::convertToQString(bool i18n) const
|
QString CInterpolationAndRenderingSetupGlobal::convertToQString(bool i18n) const
|
||||||
@@ -318,11 +309,10 @@ namespace BlackMisc
|
|||||||
CPropertyIndexList diff;
|
CPropertyIndexList diff;
|
||||||
if (this->logInterpolation() != globalSetup.logInterpolation()) { diff.push_back(IndexLogInterpolation); }
|
if (this->logInterpolation() != globalSetup.logInterpolation()) { diff.push_back(IndexLogInterpolation); }
|
||||||
if (this->showSimulatorDebugMessages() != globalSetup.showSimulatorDebugMessages()) { diff.push_back(IndexSimulatorDebugMessages); }
|
if (this->showSimulatorDebugMessages() != globalSetup.showSimulatorDebugMessages()) { diff.push_back(IndexSimulatorDebugMessages); }
|
||||||
if (this->isForcingFullInterpolation() != globalSetup.isForcingFullInterpolation()) { diff.push_back(IndexForceFullInterpolation); }
|
if (this->isForcingVtolInterpolation() != globalSetup.isForcingVtolInterpolation()) { diff.push_back(IndexForceVtolInterpolation); }
|
||||||
if (this->isAircraftPartsEnabled() != globalSetup.isAircraftPartsEnabled()) { diff.push_back(IndexEnabledAircraftParts); }
|
if (this->isAircraftPartsEnabled() != globalSetup.isAircraftPartsEnabled()) { diff.push_back(IndexEnabledAircraftParts); }
|
||||||
if (this->isGndFlagEnabled() != globalSetup.isGndFlagEnabled()) { diff.push_back(IndexEnableGndFlag); }
|
|
||||||
if (this->isSendingGndFlagToSimulator() != globalSetup.isSendingGndFlagToSimulator()) { diff.push_back(IndexSendGndFlagToSimulator); }
|
if (this->isSendingGndFlagToSimulator() != globalSetup.isSendingGndFlagToSimulator()) { diff.push_back(IndexSendGndFlagToSimulator); }
|
||||||
if (this->isFixingSceneryOffset() != globalSetup.isForcingFullInterpolation()) { diff.push_back(IndexFixSceneryOffset); }
|
if (this->isFixingSceneryOffset() != globalSetup.isForcingVtolInterpolation()) { diff.push_back(IndexFixSceneryOffset); }
|
||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
IndexLogInterpolation = CPropertyIndex::GlobalIndexCInterpolatioRenderingSetup,
|
IndexLogInterpolation = CPropertyIndex::GlobalIndexCInterpolatioRenderingSetup,
|
||||||
IndexSimulatorDebugMessages,
|
IndexSimulatorDebugMessages,
|
||||||
IndexForceFullInterpolation,
|
IndexForceVtolInterpolation,
|
||||||
IndexSendGndFlagToSimulator,
|
IndexSendGndFlagToSimulator,
|
||||||
IndexEnableGndFlag,
|
|
||||||
IndexEnabledAircraftParts,
|
IndexEnabledAircraftParts,
|
||||||
IndexInterpolatorMode,
|
IndexInterpolatorMode,
|
||||||
IndexInterpolatorModeAsString,
|
IndexInterpolatorModeAsString,
|
||||||
@@ -62,10 +61,10 @@ namespace BlackMisc
|
|||||||
void setLogInterpolation(bool log) { m_logInterpolation = log; }
|
void setLogInterpolation(bool log) { m_logInterpolation = log; }
|
||||||
|
|
||||||
//! Full interpolation (skip optimizations like checking if aircraft moves etc.)
|
//! Full interpolation (skip optimizations like checking if aircraft moves etc.)
|
||||||
bool isForcingFullInterpolation() const { return m_forceFullInterpolation; }
|
bool isForcingVtolInterpolation() const { return m_forceVtolInterpolation; }
|
||||||
|
|
||||||
//! Force full interpolation
|
//! Force full interpolation
|
||||||
void setForceFullInterpolation(bool force) { m_forceFullInterpolation = force; }
|
void setForceVtolInterpolation(bool force) { m_forceVtolInterpolation = force; }
|
||||||
|
|
||||||
//! Set enabled aircraft parts
|
//! Set enabled aircraft parts
|
||||||
bool setEnabledAircraftParts(bool enabled);
|
bool setEnabledAircraftParts(bool enabled);
|
||||||
@@ -76,12 +75,6 @@ namespace BlackMisc
|
|||||||
//! Aircraft parts enabled (still requires the other aircraft to send parts)
|
//! Aircraft parts enabled (still requires the other aircraft to send parts)
|
||||||
bool isAircraftPartsEnabled() const { return m_enabledAircraftParts; }
|
bool isAircraftPartsEnabled() const { return m_enabledAircraftParts; }
|
||||||
|
|
||||||
//! Set gnd.flag enabled (aircraft supports gnd.flag)
|
|
||||||
bool setEnabledGndFLag(bool enabled);
|
|
||||||
|
|
||||||
//! Is gnd.flag enabled (aircraft supports gnd.flag)
|
|
||||||
bool isGndFlagEnabled() const { return m_enabledGndFlag; }
|
|
||||||
|
|
||||||
//! Send GND flag to simulator
|
//! Send GND flag to simulator
|
||||||
bool isSendingGndFlagToSimulator() const { return m_sendGndToSim; }
|
bool isSendingGndFlagToSimulator() const { return m_sendGndToSim; }
|
||||||
|
|
||||||
@@ -130,9 +123,8 @@ namespace BlackMisc
|
|||||||
|
|
||||||
bool m_logInterpolation = false; //!< Debug messages in interpolator
|
bool m_logInterpolation = false; //!< Debug messages in interpolator
|
||||||
bool m_simulatorDebugMessages = false; //!< Debug messages of simulator (aka plugin)
|
bool m_simulatorDebugMessages = false; //!< Debug messages of simulator (aka plugin)
|
||||||
bool m_forceFullInterpolation = false; //!< always do a full interpolation, even if aircraft is not moving
|
bool m_forceVtolInterpolation = false; //!< always do a full interpolation, even if aircraft is not moving
|
||||||
bool m_enabledAircraftParts = true; //!< Enable aircraft parts
|
bool m_enabledAircraftParts = true; //!< Enable aircraft parts
|
||||||
bool m_enabledGndFlag = true; //!< Enable gnd.flag
|
|
||||||
bool m_sendGndToSim = true; //!< Send the gnd.flag to simulator
|
bool m_sendGndToSim = true; //!< Send the gnd.flag to simulator
|
||||||
bool m_fixSceneryOffset = true; //!< Fix. scenery offset
|
bool m_fixSceneryOffset = true; //!< Fix. scenery offset
|
||||||
int m_interpolatorMode = static_cast<int>(Spline); //!< interpolator mode (spline, ...)
|
int m_interpolatorMode = static_cast<int>(Spline); //!< interpolator mode (spline, ...)
|
||||||
@@ -213,10 +205,9 @@ namespace BlackMisc
|
|||||||
CInterpolationAndRenderingSetupGlobal,
|
CInterpolationAndRenderingSetupGlobal,
|
||||||
BLACK_METAMEMBER(logInterpolation),
|
BLACK_METAMEMBER(logInterpolation),
|
||||||
BLACK_METAMEMBER(simulatorDebugMessages),
|
BLACK_METAMEMBER(simulatorDebugMessages),
|
||||||
BLACK_METAMEMBER(forceFullInterpolation),
|
BLACK_METAMEMBER(forceVtolInterpolation),
|
||||||
BLACK_METAMEMBER(sendGndToSim),
|
BLACK_METAMEMBER(sendGndToSim),
|
||||||
BLACK_METAMEMBER(enabledAircraftParts),
|
BLACK_METAMEMBER(enabledAircraftParts),
|
||||||
BLACK_METAMEMBER(enabledGndFlag),
|
|
||||||
BLACK_METAMEMBER(fixSceneryOffset),
|
BLACK_METAMEMBER(fixSceneryOffset),
|
||||||
BLACK_METAMEMBER(interpolatorMode),
|
BLACK_METAMEMBER(interpolatorMode),
|
||||||
BLACK_METAMEMBER(maxRenderedAircraft),
|
BLACK_METAMEMBER(maxRenderedAircraft),
|
||||||
@@ -273,10 +264,9 @@ namespace BlackMisc
|
|||||||
CInterpolationAndRenderingSetupPerCallsign,
|
CInterpolationAndRenderingSetupPerCallsign,
|
||||||
BLACK_METAMEMBER(logInterpolation),
|
BLACK_METAMEMBER(logInterpolation),
|
||||||
BLACK_METAMEMBER(simulatorDebugMessages),
|
BLACK_METAMEMBER(simulatorDebugMessages),
|
||||||
BLACK_METAMEMBER(forceFullInterpolation),
|
BLACK_METAMEMBER(forceVtolInterpolation),
|
||||||
BLACK_METAMEMBER(sendGndToSim),
|
BLACK_METAMEMBER(sendGndToSim),
|
||||||
BLACK_METAMEMBER(enabledAircraftParts),
|
BLACK_METAMEMBER(enabledAircraftParts),
|
||||||
BLACK_METAMEMBER(enabledGndFlag),
|
|
||||||
BLACK_METAMEMBER(fixSceneryOffset),
|
BLACK_METAMEMBER(fixSceneryOffset),
|
||||||
BLACK_METAMEMBER(interpolatorMode)
|
BLACK_METAMEMBER(interpolatorMode)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -72,11 +72,12 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
CAircraftSituationList CInterpolator<Derived>::remoteAircraftSituationsAndChange(bool useSceneryOffset)
|
CAircraftSituationList CInterpolator<Derived>::remoteAircraftSituationsAndChange(const CInterpolationAndRenderingSetupPerCallsign &setup)
|
||||||
{
|
{
|
||||||
|
const bool vtol = setup.isForcingVtolInterpolation() || m_model.isVtol();
|
||||||
CAircraftSituationList validSituations = this->remoteAircraftSituations(m_callsign);
|
CAircraftSituationList validSituations = this->remoteAircraftSituations(m_callsign);
|
||||||
m_currentSituationChange = CAircraftSituationChange(validSituations, m_model.getCG(), m_model.isVtol(), true, true);
|
m_currentSituationChange = CAircraftSituationChange(validSituations, m_model.getCG(), vtol, true, true);
|
||||||
if (useSceneryOffset && m_currentSituationChange.hasSceneryDeviation() && m_model.hasCG())
|
if (setup.isFixingSceneryOffset() && m_currentSituationChange.hasSceneryDeviation() && m_model.hasCG())
|
||||||
{
|
{
|
||||||
const CLength os = m_currentSituationChange.getGuessedSceneryDeviationCG();
|
const CLength os = m_currentSituationChange.getGuessedSceneryDeviationCG();
|
||||||
m_currentSceneryOffset = os;
|
m_currentSceneryOffset = os;
|
||||||
@@ -84,7 +85,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
const CLength addValue = os * -1.0; // positive values means too high, negative values too low
|
const CLength addValue = os * -1.0; // positive values means too high, negative values too low
|
||||||
int changed = validSituations.addAltitudeOffset(addValue);
|
int changed = validSituations.addAltitudeOffset(addValue);
|
||||||
m_currentSituationChange = CAircraftSituationChange(validSituations, m_model.getCG(), m_model.isVtol(), true, true); // recalculate
|
m_currentSituationChange = CAircraftSituationChange(validSituations, m_model.getCG(), vtol, true, true); // recalculate
|
||||||
Q_UNUSED(changed);
|
Q_UNUSED(changed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,7 +360,7 @@ namespace BlackMisc
|
|||||||
m_currentTimeMsSinceEpoch = currentTimeSinceEpoc;
|
m_currentTimeMsSinceEpoch = currentTimeSinceEpoc;
|
||||||
m_situationsLastModified = this->situationsLastModified(m_callsign);
|
m_situationsLastModified = this->situationsLastModified(m_callsign);
|
||||||
m_currentSetup = setup;
|
m_currentSetup = setup;
|
||||||
m_currentSituations = this->remoteAircraftSituationsAndChange(setup.isFixingSceneryOffset());
|
m_currentSituations = this->remoteAircraftSituationsAndChange(setup);
|
||||||
m_currentInterpolationStatus.reset();
|
m_currentInterpolationStatus.reset();
|
||||||
m_currentPartsStatus.reset();
|
m_currentPartsStatus.reset();
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
//! Get situations and calculate change, also correct altitudes if applicable
|
//! Get situations and calculate change, also correct altitudes if applicable
|
||||||
//! \remark calculates offset (scenery) and situations change
|
//! \remark calculates offset (scenery) and situations change
|
||||||
Aviation::CAircraftSituationList remoteAircraftSituationsAndChange(bool useSceneryOffset);
|
Aviation::CAircraftSituationList remoteAircraftSituationsAndChange(const CInterpolationAndRenderingSetupPerCallsign &setup);
|
||||||
|
|
||||||
//! Center of gravity, fetched from provider in case needed
|
//! Center of gravity, fetched from provider in case needed
|
||||||
PhysicalQuantities::CLength getAndFetchModelCG();
|
PhysicalQuantities::CLength getAndFetchModelCG();
|
||||||
|
|||||||
Reference in New Issue
Block a user