Skip to content

Commit

Permalink
Fix spectrum peak measurement for SSB spectra. Fixes #2282.
Browse files Browse the repository at this point in the history
  • Loading branch information
srcejon committed Oct 31, 2024
1 parent 35aa393 commit 764bce5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdrgui/gui/glspectrumview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit 764bce5

Please sign in to comment.