From a5af0edabbbb82921186d54828c0b48c51036d72 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 13 Jan 2026 14:54:26 -0500 Subject: [PATCH] Ignore re-tune requests If the requested frequency is the same as the already-configured frequency, ignore the tuning request. --- firmware/common/radio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/common/radio.c b/firmware/common/radio.c index d1441847..29aba95c 100644 --- a/firmware/common/radio.c +++ b/firmware/common/radio.c @@ -206,6 +206,8 @@ radio_gain_t radio_get_gain(radio_t* radio, radio_chan_id chan_id, radio_gain_id return radio->channel[chan_id].config.gain[element]; } +static uint64_t applied_freq = 0xffffffffffffffff; + radio_error_t radio_set_frequency( radio_t* radio, radio_chan_id chan_id, @@ -257,6 +259,10 @@ radio_error_t radio_set_frequency( } // auto-tune + if (frequency.hz == applied_freq) { + return RADIO_OK; + } + applied_freq = frequency.hz; bool ok; #ifndef PRALINE switch (config->mode) {