Mercurial > public > ostc4
changeset 836:8d6c35655d4d Evo_2_23
Bugfix BF temperatur display and cv switching:
The temperatur view was not available in the BF selection dialog and has been added.
Because the CV_END and CV_T3_END markers are defined in two independend lists it could happen that some BF views were not displayed. This problem has been solved by considering the source array which is handed over to the switching function.
author | ideenmodellierer |
---|---|
date | Wed, 27 Dec 2023 19:24:44 +0100 |
parents | 717b460294cd |
children | 18946846b95b |
files | Discovery/Src/tHome.c Discovery/Src/tMenuEditCustom.c |
diffstat | 2 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/tHome.c Sun Dec 17 21:49:02 2023 +0100 +++ b/Discovery/Src/tHome.c Wed Dec 27 19:24:44 2023 +0100 @@ -65,6 +65,7 @@ #ifdef ENABLE_T3_PROFILE_VIEW CVIEW_T3_Profile, #endif + CVIEW_T3_Temperature, CVIEW_T3_END}; /* Private function prototypes -----------------------------------------------*/ @@ -78,10 +79,6 @@ { if(stateUsed->mode == MODE_DIVE) { - if(settingsGetPointer()->extraDisplay == EXTRADISPLAY_BFACTIVE) - { - settingsGetPointer()->design = 3; - } set_globalState(StD); } else
--- a/Discovery/Src/tMenuEditCustom.c Sun Dec 17 21:49:02 2023 +0100 +++ b/Discovery/Src/tMenuEditCustom.c Wed Dec 27 19:24:44 2023 +0100 @@ -537,6 +537,9 @@ text = TXT2BYTE_Profile; break; #endif + case CVIEW_T3_Temperature: + text = TXT2BYTE_AmbientTemperature; + break; case CVIEW_T3_GasList: text = TXT2BYTE_Gaslist; break; @@ -866,6 +869,12 @@ uint32_t id; uint8_t i; + uint8_t endID = CVIEW_END; + + if(pcv_changelist == cv_changelist_BS) + { + endID = CVIEW_T3_END; + } resetMenuEdit(CLUT_MenuPageCustomView); customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; @@ -882,7 +891,7 @@ { textPointer = 0; id = pcv_changelist[customviewsSubpage * 5 + i]; - if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ + if(id == endID) /* last list item? */ { break; } @@ -947,7 +956,7 @@ for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ { id = pcv_changelist[customviewsSubpage * 5 + i]; - if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ + if(id == endID) /* last list item? */ { break; } @@ -1033,6 +1042,12 @@ uint32_t id; uint8_t i; + uint8_t endID = CVIEW_END; + + if(pcv_curchangelist == cv_changelist_BS) + { + endID = CVIEW_T3_END; + } text[textPointer++] = '\001'; text[textPointer++] = TXT_2BYTE; @@ -1047,7 +1062,7 @@ { textPointer = 0; id = pcv_curchangelist[customviewsSubpage * 5 + i]; - if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ + if(id == endID) /* last list item? */ { break; }