Skip to content

Commit

Permalink
FIX egzumer#180: round frequency to half the step to support half cha…
Browse files Browse the repository at this point in the history
…nnel offsets
  • Loading branch information
g4eml authored and egzumer committed Dec 7, 2023
1 parent 754d2ce commit 5c1cb4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frequencies.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ uint32_t FREQUENCY_RoundToStep(uint32_t freq, uint16_t step)
}
if(step == 1)
return freq;
if(step >= 1000)
step = step/2;
return (freq + (step + 1) / 2) / step * step;
}

Expand Down

0 comments on commit 5c1cb4f

Please sign in to comment.