diff 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
line wrap: on
line diff
--- a/Discovery/Inc/tHome.h	Sun Sep 24 18:39:26 2023 +0200
+++ b/Discovery/Inc/tHome.h	Sun Sep 24 18:43:12 2023 +0200
@@ -60,6 +60,9 @@
 		EXTRADISPLAY_END
 };
 
+#define LEGACY_T3_START_ID_PRE_TIMER  (15u) /* Value == index of the first real T3 view before introduction of timer */
+#define LEGACY_CV_END_POST_TIMER (15u)	/* Value CV_END in an intermediate version. Used to identify an indexing problem */
+
 enum CUSTOMVIEWS
 {
 		CVIEW_noneOrDebug = 0,
@@ -77,7 +80,14 @@
 		CVIEW_Charger,
 		CVIEW_CcrSummary,
         CVIEW_Timer,
-		CVIEW_END,
+		CVIEW_END = 31			/* The ID is used in shift operation => 31 is the max number of supported views */
+};
+
+enum CUSTOMVIEWS_BF
+{
+		CVIEW_T3_noneOrDebug = 0,
+		CVIEW_T3_sensors,
+		CVIEW_T3_Compass,
 		CVIEW_T3_Decostop,
 		CVIEW_T3_TTS,
 		CVIEW_T3_MaxDepth,
@@ -92,7 +102,7 @@
 #ifdef ENABLE_T3_PROFILE_VIEW
 		CVIEW_T3_Profile,
 #endif
-		CVIEW_T3_END
+		CVIEW_T3_END		/* The ID is used in shift operation => 31 is the max number of supported views */
 };
 
 // for custom view switch on/off 161122 hw