diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 0f288e3..51fe0a0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -21,9 +21,7 @@
-
-
@@ -130,7 +128,7 @@
-
+
1701136012311
@@ -384,7 +382,14 @@
1701687970236
-
+
+ 1701689801897
+
+
+
+ 1701689801897
+
+
diff --git a/app/mdc1200.c b/app/mdc1200.c
index 1274976..2f41481 100644
--- a/app/mdc1200.c
+++ b/app/mdc1200.c
@@ -569,7 +569,7 @@ uint16_t extractHex(const char *str) {
} else if (c >= 'A' && c <= 'F') {
result = (result << 4) | (c - 'A' + 10);
} else {
- break; // 遇到非十六进制字符,停止解析
+ continue; // 遇到非十六进制字符,停止解析
}
}
return result;
diff --git a/app/menu.c b/app/menu.c
index 787d587..c8f7335 100644
--- a/app/menu.c
+++ b/app/menu.c
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+#include "app/mdc1200.h"
#include
#include "driver/uart.h"
#if !defined(ENABLE_OVERLAY)
@@ -503,7 +503,16 @@ void MENU_AcceptSetting(void)
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
gFlagResetVfos = true;
return;
-
+#ifdef ENABLE_MDC1200
+ case MENU_MDC_ID:
+ for (int i = 4; i >= 0; i--) {
+ if (edit[i] != ' ' && edit[i] != '_' && edit[i] != 0x00 && edit[i] != 0xff)
+ break;
+ edit[i] = ' ';
+ }
+ gEeprom.MDC1200_ID=extractHex(edit);
+ return;
+#endif
case MENU_MEM_NAME:
// trailing trim
for (int i = 9; i >= 0; i--) {