From 0d3662141100992b1afefc9d2448207c26d953ba Mon Sep 17 00:00:00 2001 From: TT Date: Sat, 28 Sep 2019 16:07:39 +0900 Subject: [PATCH] fix: unexpectedly cal reset on changing frequency range --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 0ca6be8..e4ab024 100644 --- a/main.c +++ b/main.c @@ -816,6 +816,7 @@ void set_sweep_frequency(int type, float frequency) { int32_t freq = frequency; + int cal_applied = cal_status & CALSTAT_APPLY; switch (type) { case ST_START: freq_mode_startstop(); @@ -895,7 +896,7 @@ set_sweep_frequency(int type, float frequency) break; } - if (cal_auto_interpolate && (cal_status & CALSTAT_APPLY)) + if (cal_auto_interpolate && cal_applied) cal_interpolate(lastsaveid); }