FIX #180: round frequency to half the step to support half channel offsets

This commit is contained in:
g4eml
2023-12-07 15:39:24 +01:00
committed by Krzysiek Egzmont
parent 754d2ce5fb
commit 5c1cb4f2fc

View File

@@ -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;
}