From 23202900df7bcc9668949ff1f440150ebd4d07bc Mon Sep 17 00:00:00 2001
From: Silent YANG <yang@vicicode.com>
Date: Tue, 23 Jan 2024 04:07:20 -0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B0=8F=E5=9C=86=E7=82=B9?=
 =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/main.c | 1 +
 misc.c     | 2 ++
 misc.h     | 1 +
 ui/main.c  | 1 -
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/main.c b/app/main.c
index ad355a4..7922eb4 100644
--- a/app/main.c
+++ b/app/main.c
@@ -708,6 +708,7 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
 }
 
 void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
+    last_rx_vfo = -1;
 #ifdef ENABLE_FMRADIO
     if (gFmRadioMode && Key != KEY_PTT && Key != KEY_EXIT)
     {
diff --git a/misc.c b/misc.c
index e694155..39c5e7b 100644
--- a/misc.c
+++ b/misc.c
@@ -19,6 +19,8 @@
 #include "misc.h"
 #include "settings.h"
 
+unsigned int last_rx_vfo = -1;
+
 const uint8_t     fm_radio_countdown_500ms         =  2000 / 500;  // 2 seconds
 const uint16_t    fm_play_countdown_scan_10ms      =   100 / 10;   // 100ms
 const uint16_t    fm_play_countdown_noscan_10ms    =  1200 / 10;   // 1.2 seconds
diff --git a/misc.h b/misc.h
index d40f323..76f39e2 100644
--- a/misc.h
+++ b/misc.h
@@ -337,3 +337,4 @@ inline bool SerialConfigInProgress() { return gSerialConfigCountDown_500ms != 0;
 
 
 #endif
+extern unsigned int last_rx_vfo;
diff --git a/ui/main.c b/ui/main.c
index 283b0cc..16c10c4 100644
--- a/ui/main.c
+++ b/ui/main.c
@@ -41,7 +41,6 @@
 #include "ui/ui.h"
 
 center_line_t center_line = CENTER_LINE_NONE;
-unsigned int last_rx_vfo = -1;
 
 const int8_t dBmCorrTable[7] = {
         -15, // band 1