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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user