Mercurial > public > ostc4
diff Discovery/Src/tMenuEditCustom.c @ 815:ce8f71217f45
Bugfix CustomView selection during dive mode:
The CustomView selection during dive mode was limited to two pages, while meanwhile three are needed to show all options. The problem did not showup in surface mode selection. Rootcause was a static definition instead of the dynamic one used in surface mode. In addition with every page shift a new page was created which might cause display errors after some times. To solve this the pages are now updated instead of rebuilding the pages.
author | Ideenmodellierer |
---|---|
date | Sun, 03 Sep 2023 18:03:49 +0200 |
parents | dd7ce655db26 |
children | 7322adb00305 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditCustom.c Sun Sep 03 17:58:12 2023 +0200 +++ b/Discovery/Src/tMenuEditCustom.c Sun Sep 03 18:03:49 2023 +0200 @@ -44,7 +44,6 @@ #define CV_PER_PAGE (5u) /* number of cv selections shown at one page */ -#define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */ #define MAX_BACKLIGHT_BOOST (2u) /* max number of backlight levels which may be increased during focus state */ #define MAX_FOCUS_LIMITER (2u) /* max number for reducing the spot used for focus detection */ @@ -930,22 +929,19 @@ { static uint8_t customviewsSubpage = 0; SSettings *pSettings = settingsGetPointer(); - char text[MAX_PAGE_TEXTSIZE]; - uint16_t tabPosition; - uint32_t id; + customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(cv_changelist) / CV_PER_PAGE) + 1; if((line == 6) || (cv_changelist[customviewsSubpage * 5 + line-1] == CVIEW_END)) /* select next set of views */ { customviewsSubpage++; - if(customviewsSubpage == CV_SUBPAGE_MAX) + if(customviewsSubpage == customviewsSubpageMax) { customviewsSubpage = 0; } set_CustomsviewsSubpage(customviewsSubpage); /* rebuild the selection page with the next set of customer views */ - id = tMSystem_refresh(0, text, &tabPosition, NULL); - tM_build_page(id, text, tabPosition, NULL); + updateSpecificMenu(StMSYS); openMenu(0); } else