diff Discovery/Src/base.c @ 885:8d3f3a635397 Evo_2_23

Replaced global hardwareDisplay with unit access: The previous global hardwaredisplay, which indicated the display version, is stored in scope of ostc.c with interface function access.
author Ideenmodellierer
date Sun, 01 Sep 2024 21:35:50 +0200
parents 6b06143cbfea
children f29369fff71e
line wrap: on
line diff
--- a/Discovery/Src/base.c	Sun Sep 01 20:31:01 2024 +0200
+++ b/Discovery/Src/base.c	Sun Sep 01 21:35:50 2024 +0200
@@ -1258,12 +1258,12 @@
         case 0: /* Cave */
             levelMax = 3000;/* max 25 % (x2) */
             levelMin = 1500;
-            if (hardwareDisplay == 1) display_1_brightness_cave();
+            if( isNewDisplay()) display_1_brightness_cave();
             break;
         case 1: /* Eco */
             levelMax = 6000;/* max 50 % (x2) */
             levelMin = 3000;
-            if (hardwareDisplay == 1) display_1_brightness_eco();
+            if ( isNewDisplay()) display_1_brightness_eco();
             break;
         case 2: /* Std */
             levelAmbient += 1000;
@@ -1271,7 +1271,7 @@
             levelMin = 4500;
             levelUpStep_100ms += levelUpStep_100ms/2; // 4500 instead of 3000
             levelDnStep_100ms += levelDnStep_100ms/2;
-            if (hardwareDisplay == 1) display_1_brightness_std();
+            if ( isNewDisplay()) display_1_brightness_std();
             break;
         case 3: /* High */
         default:
@@ -1280,7 +1280,7 @@
             levelMin = 6000;
             levelUpStep_100ms += levelUpStep_100ms; // 6000 instead of 3000
             levelDnStep_100ms += levelDnStep_100ms;
-            if (hardwareDisplay == 1) display_1_brightness_high();
+            if ( isNewDisplay()) display_1_brightness_high();
             break;
         case 4: /* New Max */
             levelAmbient = 12000;
@@ -1288,7 +1288,7 @@
             levelMin = 12000;
             levelUpStep_100ms += 12000;
             levelDnStep_100ms += 0;
-            if (hardwareDisplay == 1) display_1_brightness_max();
+            if ( isNewDisplay()) display_1_brightness_max();
             break;
         }