comparison Discovery/Src/tMenuEditCustom.c @ 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 70092f552f5a
comparison
equal deleted inserted replaced
835:717b460294cd 836:8d6c35655d4d
535 #ifdef ENABLE_T3_PROFILE_VIEW 535 #ifdef ENABLE_T3_PROFILE_VIEW
536 case CVIEW_T3_Profile: 536 case CVIEW_T3_Profile:
537 text = TXT2BYTE_Profile; 537 text = TXT2BYTE_Profile;
538 break; 538 break;
539 #endif 539 #endif
540 case CVIEW_T3_Temperature:
541 text = TXT2BYTE_AmbientTemperature;
542 break;
540 case CVIEW_T3_GasList: 543 case CVIEW_T3_GasList:
541 text = TXT2BYTE_Gaslist; 544 text = TXT2BYTE_Gaslist;
542 break; 545 break;
543 case CVIEW_T3_MaxDepth: 546 case CVIEW_T3_MaxDepth:
544 text = TXT2BYTE_MaxDepth; 547 text = TXT2BYTE_MaxDepth;
864 char text[MAX_PAGE_TEXTSIZE]; 867 char text[MAX_PAGE_TEXTSIZE];
865 uint8_t textPointer = 0; 868 uint8_t textPointer = 0;
866 uint32_t id; 869 uint32_t id;
867 870
868 uint8_t i; 871 uint8_t i;
872 uint8_t endID = CVIEW_END;
873
874 if(pcv_changelist == cv_changelist_BS)
875 {
876 endID = CVIEW_T3_END;
877 }
869 878
870 resetMenuEdit(CLUT_MenuPageCustomView); 879 resetMenuEdit(CLUT_MenuPageCustomView);
871 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; 880 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1;
872 881
873 if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */ 882 if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */
880 889
881 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ 890 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */
882 { 891 {
883 textPointer = 0; 892 textPointer = 0;
884 id = pcv_changelist[customviewsSubpage * 5 + i]; 893 id = pcv_changelist[customviewsSubpage * 5 + i];
885 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ 894 if(id == endID) /* last list item? */
886 { 895 {
887 break; 896 break;
888 } 897 }
889 else 898 else
890 { 899 {
945 954
946 /* because of the ID handling inside of the functions, all buttons needs to be assigned before the events may be set => have the same loop twice */ 955 /* because of the ID handling inside of the functions, all buttons needs to be assigned before the events may be set => have the same loop twice */
947 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ 956 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */
948 { 957 {
949 id = pcv_changelist[customviewsSubpage * 5 + i]; 958 id = pcv_changelist[customviewsSubpage * 5 + i];
950 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ 959 if(id == endID) /* last list item? */
951 { 960 {
952 break; 961 break;
953 } 962 }
954 else 963 else
955 { 964 {
1031 char text[MAX_PAGE_TEXTSIZE]; 1040 char text[MAX_PAGE_TEXTSIZE];
1032 uint8_t textPointer = 0; 1041 uint8_t textPointer = 0;
1033 uint32_t id; 1042 uint32_t id;
1034 1043
1035 uint8_t i; 1044 uint8_t i;
1045 uint8_t endID = CVIEW_END;
1046
1047 if(pcv_curchangelist == cv_changelist_BS)
1048 {
1049 endID = CVIEW_T3_END;
1050 }
1036 1051
1037 text[textPointer++] = '\001'; 1052 text[textPointer++] = '\001';
1038 text[textPointer++] = TXT_2BYTE; 1053 text[textPointer++] = TXT_2BYTE;
1039 text[textPointer++] = TXT2BYTE_SelectCustomviews; 1054 text[textPointer++] = TXT2BYTE_SelectCustomviews;
1040 text[textPointer++] = ' '; 1055 text[textPointer++] = ' ';
1045 1060
1046 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ 1061 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */
1047 { 1062 {
1048 textPointer = 0; 1063 textPointer = 0;
1049 id = pcv_curchangelist[customviewsSubpage * 5 + i]; 1064 id = pcv_curchangelist[customviewsSubpage * 5 + i];
1050 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ 1065 if(id == endID) /* last list item? */
1051 { 1066 {
1052 break; 1067 break;
1053 } 1068 }
1054 else 1069 else
1055 { 1070 {