Skip to content

Commit

Permalink
Prevent peak recognition for two consecutive equal samples
Browse files Browse the repository at this point in the history
  • Loading branch information
rapgenic committed Oct 16, 2024
1 parent 4a9b1c3 commit d2f6f99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdrgui/gui/glspectrumview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,7 @@ 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))
while ((left > maxLeft) && (spectrum[left] <= prevLeft) && (right < maxRight) && (spectrum[right] <= prevRight))
{
prevLeft = spectrum[left];
left--;
Expand Down

0 comments on commit d2f6f99

Please sign in to comment.