Skip to content

Commit

Permalink
Merge pull request #2299 from srcejon/fix_2282
Browse files Browse the repository at this point in the history
Fix spectrum peak measurement for SSB spectra.
  • Loading branch information
f4exb authored Oct 31, 2024
2 parents 4b37779 + 764bce5 commit 618e234
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 618e234

Please sign in to comment.