mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Merge pull request #2299 from srcejon/fix_2282
Fix spectrum peak measurement for SSB spectra.
This commit is contained in:
commit
618e234d6c
@ -2423,7 +2423,8 @@ void GLSpectrumView::peakWidth(const Real *spectrum, int center, int &left, int
|
|||||||
float prevRight = spectrum[center];
|
float prevRight = spectrum[center];
|
||||||
left = center - 1;
|
left = center - 1;
|
||||||
right = 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];
|
prevLeft = spectrum[left];
|
||||||
left--;
|
left--;
|
||||||
|
Loading…
Reference in New Issue
Block a user