1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Spectrum frequency zoom: Restrict autoscale to visible spectrum area. Added missing images for documentation. Issue #773

This commit is contained in:
f4exb
2021-02-18 06:23:12 +01:00
parent 7ea71996f0
commit a8bba2e95a
5 changed files with 12 additions and 2 deletions
+9
View File
@@ -683,6 +683,15 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV
m_mutex.unlock();
}
void SpectrumVis::getZoomedPSDCopy(std::vector<Real>& copy) const
{
int fftMin = (m_frequencyZoomFactor == 1.0f) ?
0 : (m_frequencyZoomPos - (0.5f / m_frequencyZoomFactor)) * m_settings.m_fftSize;
int fftMax = (m_frequencyZoomFactor == 1.0f) ?
m_settings.m_fftSize : (m_frequencyZoomPos + (0.5f / m_frequencyZoomFactor)) * m_settings.m_fftSize;
copy.assign(m_psd.begin() + fftMin, m_psd.begin() + fftMax);
}
void SpectrumVis::start()
{
setRunning(true);