File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -118,20 +118,23 @@ def uv_index_enabled(self):
118
118
def uv_index_enabled (self , enable ):
119
119
chlist = self ._param_query (_RAM_CHLIST )
120
120
if enable :
121
- chlist |= 0b01000000
121
+ chlist |= 0b10000000
122
122
else :
123
- chlist &= ~ 0b01000000
123
+ chlist &= ~ 0b10000000
124
124
self ._param_set (_RAM_CHLIST , chlist )
125
125
self ._als_enabled = enable
126
126
127
- self ._ucoeff_0 = 0x00
128
- self ._ucoeff_1 = 0x02
129
- self ._ucoeff_2 = 0x89
130
- self ._ucoeff_3 = 0x29
127
+ self ._ucoeff_0 = (0x29 ,)
128
+ self ._ucoeff_1 = (0x89 ,)
129
+ self ._ucoeff_2 = (0x02 ,)
130
+ self ._ucoeff_3 = (0x00 ,)
131
+
132
+ self ._uv_index_enabled = enable
131
133
132
134
@property
133
135
def uv_index (self ):
134
136
"""The UV Index value"""
137
+ self ._send_command (_CMD_ALS_FORCE )
135
138
return self ._aux_data [0 ] / 100
136
139
137
140
def reset (self ):
You can’t perform that action at this time.
0 commit comments