This commit is contained in:
wu58430 2023-12-04 21:46:50 +08:00
parent d8914e5966
commit 8c71d28563

View file

@ -688,13 +688,18 @@ void UI_DisplayMenu(void) {
// gIsInSubMenu // gIsInSubMenu
if (!gIsInSubMenu||edit_index<0) { // show the channel name if (!gIsInSubMenu||edit_index<0) { // show the channel name
// sprintf(edit, "%04lX", gEeprom.MDC1200_ID); // %04X确保输出是4个字符长度的十六进制数 // sprintf(edit, "%04lX", gEeprom.MDC1200_ID); // %04X确保输出是4个字符长度的十六进制数
edit[0]=String[0];
edit[1]=String[0];
edit[2]=String[0];
edit[3]=String[0];
sprintf(String, "%04X", gEeprom.MDC1200_ID); // %04X确保输出是4个字符长度的十六进制数 sprintf(String, "%04X", gEeprom.MDC1200_ID); // %04X确保输出是4个字符长度的十六进制数
UI_PrintStringSmall(String, menu_item_x1, menu_item_x2, 3);//4 UI_PrintStringSmall(String, menu_item_x1, menu_item_x2, 3);//4
} else { // show the channel name being edited } else { // show the channel name being edited
UI_PrintStringSmall(edit, menu_item_x1, menu_item_x2, 3); UI_PrintStringSmall(edit, menu_item_x1, menu_item_x2, 3);
if (edit_index < 4) if (edit_index < 4)
UI_PrintStringSmall("^", (((menu_item_x2 - menu_item_x1) - (32)) + 1) / 2 + (8 * edit_index), 0, 4); // show the cursor UI_PrintStringSmall("^", menu_item_x1+(((menu_item_x2 - menu_item_x1) - (32)) + 1) / 2 + (8 * edit_index), 0, 4); // show the cursor
} }
already_printed = true; already_printed = true;
break; break;