1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 07:41:46 -05:00

Fix spectrum peak measurement for SSB spectra. Fixes #2282.

This commit is contained in:
Jon Beniston 2024-10-31 12:42:46 +00:00
parent 35aa393f11
commit 764bce52fe

View File

@ -2423,7 +2423,8 @@ void GLSpectrumView::peakWidth(const Real *spectrum, int center, int &left, int
float prevRight = spectrum[center];
left = center - 1;
right = center + 1;
while ((left > maxLeft) && (spectrum[left] < prevLeft) && (right < maxRight) && (spectrum[right] < prevRight))
// Use <= as SSB spectrums have duplicated values
while ((left > maxLeft) && (spectrum[left] <= prevLeft) && (right < maxRight) && (spectrum[right] <= prevRight))
{
prevLeft = spectrum[left];
left--;