Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
884:940f8e132638 | 885:8d3f3a635397 |
---|---|
1256 switch( pSettings->brightness + blBoost) | 1256 switch( pSettings->brightness + blBoost) |
1257 { | 1257 { |
1258 case 0: /* Cave */ | 1258 case 0: /* Cave */ |
1259 levelMax = 3000;/* max 25 % (x2) */ | 1259 levelMax = 3000;/* max 25 % (x2) */ |
1260 levelMin = 1500; | 1260 levelMin = 1500; |
1261 if (hardwareDisplay == 1) display_1_brightness_cave(); | 1261 if( isNewDisplay()) display_1_brightness_cave(); |
1262 break; | 1262 break; |
1263 case 1: /* Eco */ | 1263 case 1: /* Eco */ |
1264 levelMax = 6000;/* max 50 % (x2) */ | 1264 levelMax = 6000;/* max 50 % (x2) */ |
1265 levelMin = 3000; | 1265 levelMin = 3000; |
1266 if (hardwareDisplay == 1) display_1_brightness_eco(); | 1266 if ( isNewDisplay()) display_1_brightness_eco(); |
1267 break; | 1267 break; |
1268 case 2: /* Std */ | 1268 case 2: /* Std */ |
1269 levelAmbient += 1000; | 1269 levelAmbient += 1000; |
1270 levelMax = 9000; | 1270 levelMax = 9000; |
1271 levelMin = 4500; | 1271 levelMin = 4500; |
1272 levelUpStep_100ms += levelUpStep_100ms/2; // 4500 instead of 3000 | 1272 levelUpStep_100ms += levelUpStep_100ms/2; // 4500 instead of 3000 |
1273 levelDnStep_100ms += levelDnStep_100ms/2; | 1273 levelDnStep_100ms += levelDnStep_100ms/2; |
1274 if (hardwareDisplay == 1) display_1_brightness_std(); | 1274 if ( isNewDisplay()) display_1_brightness_std(); |
1275 break; | 1275 break; |
1276 case 3: /* High */ | 1276 case 3: /* High */ |
1277 default: | 1277 default: |
1278 levelAmbient += 3000; | 1278 levelAmbient += 3000; |
1279 levelMax = 12000; /* max 100% (x2) */ | 1279 levelMax = 12000; /* max 100% (x2) */ |
1280 levelMin = 6000; | 1280 levelMin = 6000; |
1281 levelUpStep_100ms += levelUpStep_100ms; // 6000 instead of 3000 | 1281 levelUpStep_100ms += levelUpStep_100ms; // 6000 instead of 3000 |
1282 levelDnStep_100ms += levelDnStep_100ms; | 1282 levelDnStep_100ms += levelDnStep_100ms; |
1283 if (hardwareDisplay == 1) display_1_brightness_high(); | 1283 if ( isNewDisplay()) display_1_brightness_high(); |
1284 break; | 1284 break; |
1285 case 4: /* New Max */ | 1285 case 4: /* New Max */ |
1286 levelAmbient = 12000; | 1286 levelAmbient = 12000; |
1287 levelMax = 12000; /* max 100% (x2) */ | 1287 levelMax = 12000; /* max 100% (x2) */ |
1288 levelMin = 12000; | 1288 levelMin = 12000; |
1289 levelUpStep_100ms += 12000; | 1289 levelUpStep_100ms += 12000; |
1290 levelDnStep_100ms += 0; | 1290 levelDnStep_100ms += 0; |
1291 if (hardwareDisplay == 1) display_1_brightness_max(); | 1291 if ( isNewDisplay()) display_1_brightness_max(); |
1292 break; | 1292 break; |
1293 } | 1293 } |
1294 | 1294 |
1295 if((pSettings->brightness != brightnessModeLast))// || wasLostConnection) | 1295 if((pSettings->brightness != brightnessModeLast))// || wasLostConnection) |
1296 { | 1296 { |