Vault-Tec Labs
Advertisement

set_light_level is not a linear function and argument of 0 does not mean black screen. Here's a graph and a table to help to understand what it actually does.

Graph: set_light_level vs actual brightness[]

set_light_level vs get_light_level

[]

Values table[]

Sfall's get_light_level returns more or less honest brightness - what your eyes see.
set_light_level is mostly linear, but it starts at 25% and has 2 huge jumps in the middle (49>50, 50>51).

set_light_level get_light_level get_light_level/65336
0 16384 25.000
1 16629 25.373
2 16875 25.749
3 17121 26.124
4 17367 26.499
5 17612 26.873
6 17858 27.249
7 18104 27.624
8 18350 27.999
9 18595 28.373
10 18841 28.749
11 19087 29.124
12 19333 29.499
13 19578 29.873
14 19824 30.249
15 20070 30.624
16 20316 30.999
17 20561 31.373
18 20807 31.748
19 21053 32.124
20 21299 32.499
21 21544 32.873
22 21790 33.248
23 22036 33.624
24 22282 33.999
25 22528 34.375
26 22773 34.748
27 23019 35.124
28 23265 35.499
29 23511 35.874
30 23756 36.248
31 24002 36.624
32 24248 36.999
33 24494 37.374
34 24739 37.748
35 24985 38.124
36 25231 38.499
37 25477 38.874
38 25722 39.248
39 25968 39.624
40 26214 39.999
41 26460 40.374
42 26705 40.748
43 26951 41.123
44 27197 41.499
45 27443 41.874
46 27688 42.248
47 27934 42.623
48 28180 42.999
49 28426 43.374
50 40960 62.500
51 53493 81.623
52 53739 81.999
53 53985 82.374
54 54231 82.749
55 54476 83.123
56 54722 83.499
57 54968 83.874
58 55214 84.249
59 55459 84.623
60 55705 84.999
61 55951 85.374
62 56197 85.749
63 56442 86.123
64 56688 86.499
65 56934 86.874
66 57180 87.249
67 57425 87.623
68 57671 87.998
69 57917 88.374
70 58163 88.749
71 58408 89.123
72 58654 89.498
73 58900 89.874
74 59146 90.249
75 59392 90.625
76 59637 90.998
77 59883 91.374
78 60129 91.749
79 60375 92.124
80 60620 92.498
81 60866 92.874
82 61112 93.249
83 61358 93.624
84 61603 93.998
85 61849 94.374
86 62095 94.749
87 62341 95.124
88 62586 95.498
89 62832 95.874
90 63078 96.249
91 63324 96.624
92 63569 96.998
93 63815 97.373
94 64061 97.749
95 64307 98.124
96 64552 98.498
97 64798 98.873
98 65044 99.249
99 65290 99.624
100 65536 100.000
Advertisement