# HG changeset patch # User Ideenmodellierer # Date 1667504226 -3600 # Node ID 10b7d271b9c4b395b3b07e05082eeefc510126a0 # Parent 158d612a9f4d639b2a44bcd9c8cb72a7c9b7caeb Bugfix: only reset menu if a new sub menu is created: In the previous version a short black screen (blink) happend while changing parameters. Root cause was that the menu structure was reset while no submenu was created because the value update happend at the actual menu. This has been fixed by only resetting the menu if it is really needed diff -r 158d612a9f4d -r 10b7d271b9c4 Discovery/Src/tMenuEditCustom.c --- a/Discovery/Src/tMenuEditCustom.c Tue Nov 01 09:55:45 2022 +0100 +++ b/Discovery/Src/tMenuEditCustom.c Thu Nov 03 20:37:06 2022 +0100 @@ -336,12 +336,11 @@ void openEdit_Custom(uint8_t line) { set_globalState_Menu_Line(line); - resetMenuEdit(CLUT_MenuPageCustomView); switch(line) { case 1: - default: openEdit_Customview(); + default: openEdit_Customview(); break; case 2: openEdit_BigScreen(); break; @@ -357,6 +356,7 @@ /* Private functions ---------------------------------------------------------*/ void openEdit_Customview(void) { + resetMenuEdit(CLUT_MenuPageCustomView); refresh_Customviews(); write_field_button(StMCustom1_CViewTimeout, 400, 700, ME_Y_LINE1, &FontT48, ""); @@ -426,6 +426,7 @@ void openEdit_ViewPort(void) { + resetMenuEdit(CLUT_MenuPageCustomView); refresh_ViewPort(); write_field_button(StMCustom5_CViewPortCalib, 400, 700, ME_Y_LINE2, &FontT48, ""); @@ -797,6 +798,7 @@ uint8_t i; + resetMenuEdit(CLUT_MenuPageCustomView); customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */