From 16492ce7ee7f65a59d60b28352f181459351c884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= Date: Sat, 27 Jan 2024 11:08:24 +0100 Subject: [PATCH] Fix non-prime deltas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Hamal Dvořák --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index e17afdc..430f976 100644 --- a/src/main.c +++ b/src/main.c @@ -508,11 +508,15 @@ static void rf_rx(void) #if PRIME_DELTA while (!is_prime_or_one(--delta_watermark)) ; +#else + delta_watermark--; #endif } else if (delta > (delta_watermark + acceptable_deviation)) { #if PRIME_DELTA while (!is_prime_or_one(++delta_watermark)) ; +#else + delta_watermark++; #endif }