GLSpectrum settings rename m_averagingNb to m_averagingValue for better consistency and ensure synchronization with m_averagingIndex

This commit is contained in:
f4exb 2020-05-06 01:36:58 +02:00
parent 4d86d7e510
commit 9ea22a9cd5
2 changed files with 15 additions and 0 deletions

View File

@ -132,7 +132,11 @@ void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
swgSpectrum->init();
response.getChannelAnalyzerSettings()->setSpectrumConfig(swgSpectrum);
swgSpectrum->setAveragingMode((int) spectrumSettings.m_averagingMode);
<<<<<<< ours
swgSpectrum->setAveragingValue(spectrumSettings.m_averagingValue);
=======
swgSpectrum->setAveragingValue(GLSpectrumSettings::getAveragingValue(spectrumSettings.m_averagingIndex, spectrumSettings.m_averagingMode));
>>>>>>> theirs
swgSpectrum->setDecay(spectrumSettings.m_decay);
swgSpectrum->setDecayDivisor(spectrumSettings.m_decayDivisor);
swgSpectrum->setDisplayCurrent(spectrumSettings.m_displayCurrent ? 1 : 0);
@ -379,8 +383,15 @@ void ChannelAnalyzerWebAPIAdapter::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("spectrumConfig.averagingMode")) {
spectrumSettings.m_averagingMode = (GLSpectrumSettings::AveragingMode) response.getChannelAnalyzerSettings()->getSpectrumConfig()->getAveragingMode();
}
<<<<<<< ours
if (channelSettingsKeys.contains("spectrumConfig.averagingValue")) {
spectrumSettings.m_averagingValue = response.getChannelAnalyzerSettings()->getSpectrumConfig()->getAveragingValue();
=======
if (channelSettingsKeys.contains("spectrumConfig.averagingValue"))
{
spectrumSettings.m_averagingValue = response.getChannelAnalyzerSettings()->getSpectrumConfig()->getAveragingValue();
spectrumSettings.m_averagingIndex = GLSpectrumSettings::getAveragingIndex(spectrumSettings.m_averagingValue, spectrumSettings.m_averagingMode);
>>>>>>> theirs
}
if (channelSettingsKeys.contains("spectrumConfig.decay")) {
spectrumSettings.m_decay = response.getChannelAnalyzerSettings()->getSpectrumConfig()->getDecay();

View File

@ -48,7 +48,11 @@ void GLSpectrumSettings::resetToDefaults()
m_displayGrid = false;
m_averagingMode = AvgModeNone;
m_averagingIndex = 0;
<<<<<<< ours
m_averagingValue = 1;
=======
m_averagingValue = 1;
>>>>>>> theirs
m_linear = false;
m_ssb = false;
m_usb = true;