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:
parent
35aa393f11
commit
764bce52fe
@ -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--;
|
||||
|
Loading…
Reference in New Issue
Block a user