From 5c1cb4f2fc93c2f78beb3cb529da278cce1af510 Mon Sep 17 00:00:00 2001 From: g4eml Date: Thu, 7 Dec 2023 15:39:24 +0100 Subject: [PATCH] FIX #180: round frequency to half the step to support half channel offsets --- frequencies.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frequencies.c b/frequencies.c index 0932d3695..7c174c4ae 100644 --- a/frequencies.c +++ b/frequencies.c @@ -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; }