# HG changeset patch # User Ideenmodellierer # Date 1757270675 -7200 # Node ID e938901f6386840c874c2a42b2ac42c55cb7db93 # Parent 3d9552e4997c5252b4c7bf514dfe8251ecad6e28 Text editfield redraw string: The size of characters may vary from letter to letter. This caused the edit string to be partly overwritten. To avoid this the following ltters are now rewritten in case the current letter is changed. diff -r 3d9552e4997c -r e938901f6386 Common/CPU1-F429.ld --- a/Common/CPU1-F429.ld Sun Sep 07 19:08:43 2025 +0200 +++ b/Common/CPU1-F429.ld Sun Sep 07 20:44:35 2025 +0200 @@ -208,7 +208,7 @@ /* Define Known Address for Each Font */ /* Flash Sector 23 is protected (bootloader font + image) => use end of sector 22 */ -.lower_fonts 0x080A0000 : { +.lower_fonts 0x080AA000 : { *(.lower_fonts.image_data_*) *(.lower_fonts.*) diff -r 3d9552e4997c -r e938901f6386 Discovery/Src/tMenuEdit.c --- a/Discovery/Src/tMenuEdit.c Sun Sep 07 19:08:43 2025 +0200 +++ b/Discovery/Src/tMenuEdit.c Sun Sep 07 20:44:35 2025 +0200 @@ -551,7 +551,10 @@ void mark_new_digit_of_actual_id_block_and_subBlock(void) { char oneCharText[2]; + char text[10]; uint16_t positionOffset; + uint8_t index = 0; + uint8_t textPos = 0; if(event[actualevid].callerID != ident[actualId].callerID) return; @@ -563,6 +566,19 @@ positionOffset = GFX_return_offset(ident[actualId].fontUsed, ident[actualId].newText, ident[actualId].begin[block] + subBlockPosition); write_content( ident[actualId].coord[0] + positionOffset, ident[actualId].coord[1], ident[actualId].coord[2], ident[actualId].fontUsed, oneCharText, CLUT_MenuEditDigit); } + if(ident[actualId].maintype == FIELD_TEXT) /* letter width may change from character to character => output end of string */ + { + if(block + 1 < 8) + { + for(index = block + 1; index < 8; index++) + { + text[textPos++] = ident[actualId].newText[ident[actualId].begin[index] + 0]; + } + text[textPos] = 0; + positionOffset = GFX_return_offset(ident[actualId].fontUsed, ident[actualId].newText, ident[actualId].begin[block + 1] + subBlockPosition); + write_content( ident[actualId].coord[0] + positionOffset, ident[actualId].coord[1], ident[actualId].coord[2], ident[actualId].fontUsed, text, CLUT_MenuEditFieldSelected); + } + } }