diff Discovery/Src/settings.c @ 443:a5101c688b49 minor_improvments

Introduced enum for lower left corner view selection: Enums allow changes in view configuration without danger of index inconsistencies
author ideenmodellierer
date Sat, 29 Feb 2020 22:27:04 +0100
parents 5b4c78c36b04
children dddfe7917131
line wrap: on
line diff
--- a/Discovery/Src/settings.c	Sat Feb 29 22:25:20 2020 +0100
+++ b/Discovery/Src/settings.c	Sat Feb 29 22:27:04 2020 +0100
@@ -33,6 +33,7 @@
 #include "text_multilanguage.h" // for LANGUAGE_END
 #include "tHome.h" // for CVIEW_END
 #include "motion.h"
+#include "t7.h"
 
 SSettings Settings;
 
@@ -275,7 +276,7 @@
     .scooterSPARE2[0] = 0,
     .ppo2sensors_deactivated = 0,
     .tX_colorscheme  = 0,
-    .tX_userselectedLeftLowerCornerPrimary = 1,
+    .tX_userselectedLeftLowerCornerPrimary = LLC_Temperature,
     .tX_userselectedLeftLowerCornerTimeout = 0,
     .tX_customViewPrimary = 1,
     .tX_customViewTimeout = 0,
@@ -1161,9 +1162,9 @@
 
 /*	uint8_t tX_userselectedLeftLowerCornerPrimary;
  */
-    if(Settings.tX_userselectedLeftLowerCornerPrimary > 8)
+    if(Settings.tX_userselectedLeftLowerCornerPrimary >= LLC_END)
     {
-        Settings.tX_userselectedLeftLowerCornerPrimary = 1;
+        Settings.tX_userselectedLeftLowerCornerPrimary = LLC_Temperature;
         corrections++;
     }