Mercurial > public > ostc4
comparison Discovery/Inc/tHome.h @ 820:7322adb00305
Split definition of custom views:
In the previous version the T7 and T3 custom views were defined using the same enum. As result an ID shift may happen causing errors in the selection of the big font views.
The second reason to split the definition is that shift operations are used in uint32_t variable (limit 32). The total number of current views is 27 => splitting will avoid ID problems in case new views are added.
author | Ideenmodellierer |
---|---|
date | Sun, 24 Sep 2023 18:43:12 +0200 |
parents | dd7ce655db26 |
children | 18946846b95b |
comparison
equal
deleted
inserted
replaced
819:24b39a432bc2 | 820:7322adb00305 |
---|---|
58 EXTRADISPLAY_DECOGAME, | 58 EXTRADISPLAY_DECOGAME, |
59 #endif | 59 #endif |
60 EXTRADISPLAY_END | 60 EXTRADISPLAY_END |
61 }; | 61 }; |
62 | 62 |
63 #define LEGACY_T3_START_ID_PRE_TIMER (15u) /* Value == index of the first real T3 view before introduction of timer */ | |
64 #define LEGACY_CV_END_POST_TIMER (15u) /* Value CV_END in an intermediate version. Used to identify an indexing problem */ | |
65 | |
63 enum CUSTOMVIEWS | 66 enum CUSTOMVIEWS |
64 { | 67 { |
65 CVIEW_noneOrDebug = 0, | 68 CVIEW_noneOrDebug = 0, |
66 CVIEW_sensors, | 69 CVIEW_sensors, |
67 CVIEW_Compass, | 70 CVIEW_Compass, |
75 CVIEW_CompassDebug, | 78 CVIEW_CompassDebug, |
76 CVIEW_SummaryOfLeftCorner, | 79 CVIEW_SummaryOfLeftCorner, |
77 CVIEW_Charger, | 80 CVIEW_Charger, |
78 CVIEW_CcrSummary, | 81 CVIEW_CcrSummary, |
79 CVIEW_Timer, | 82 CVIEW_Timer, |
80 CVIEW_END, | 83 CVIEW_END = 31 /* The ID is used in shift operation => 31 is the max number of supported views */ |
84 }; | |
85 | |
86 enum CUSTOMVIEWS_BF | |
87 { | |
88 CVIEW_T3_noneOrDebug = 0, | |
89 CVIEW_T3_sensors, | |
90 CVIEW_T3_Compass, | |
81 CVIEW_T3_Decostop, | 91 CVIEW_T3_Decostop, |
82 CVIEW_T3_TTS, | 92 CVIEW_T3_TTS, |
83 CVIEW_T3_MaxDepth, | 93 CVIEW_T3_MaxDepth, |
84 CVIEW_T3_ppO2andGas, | 94 CVIEW_T3_ppO2andGas, |
85 CVIEW_T3_StopWatch, | 95 CVIEW_T3_StopWatch, |
90 CVIEW_T3_DepthData, | 100 CVIEW_T3_DepthData, |
91 CVIEW_T3_DecoTTS, | 101 CVIEW_T3_DecoTTS, |
92 #ifdef ENABLE_T3_PROFILE_VIEW | 102 #ifdef ENABLE_T3_PROFILE_VIEW |
93 CVIEW_T3_Profile, | 103 CVIEW_T3_Profile, |
94 #endif | 104 #endif |
95 CVIEW_T3_END | 105 CVIEW_T3_END /* The ID is used in shift operation => 31 is the max number of supported views */ |
96 }; | 106 }; |
97 | 107 |
98 // for custom view switch on/off 161122 hw | 108 // for custom view switch on/off 161122 hw |
99 extern const uint8_t cv_changelist[]; | 109 extern const uint8_t cv_changelist[]; |
100 extern const uint8_t cv_changelist_BS[]; | 110 extern const uint8_t cv_changelist_BS[]; |