From e3a10a78682c40b57347e4569f5e7f54f62d9035 Mon Sep 17 00:00:00 2001 From: TT Date: Tue, 8 Oct 2019 23:59:16 +0900 Subject: [PATCH] fixed: #70 first measurement point sometimes has wrong value --- main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main.c b/main.c index 37f679d..86e3055 100644 --- a/main.c +++ b/main.c @@ -286,12 +286,7 @@ adjust_gain(int newfreq) int set_frequency(uint32_t freq) { - int delay = 0; - if (frequency == freq) - return delay; - - delay += adjust_gain(freq); - + int delay = adjust_gain(freq); int8_t ds = drive_strength; if (ds == DRIVE_STRENGTH_AUTO) { ds = freq > FREQ_HARMONICS ? SI5351_CLK_DRIVE_STRENGTH_8MA : SI5351_CLK_DRIVE_STRENGTH_2MA;