aboutsummaryrefslogtreecommitdiff
path: root/monitor_unified.py
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_unified.py')
-rw-r--r--monitor_unified.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitor_unified.py b/monitor_unified.py
index dcae8de..f1ab3a8 100644
--- a/monitor_unified.py
+++ b/monitor_unified.py
@@ -341,11 +341,11 @@ class Light(Sensor):
# max reading a channel can hold
# on exposure 402ms:
- self.max_read = 65535
+ max_read = 65535
# on exposure 100ms:
- self.max_read_1 = 37177
+ max_read_1 = 37177
# on exposure 13.7ms:
- self.max_read_2 = 5047
+ max_read_2 = 5047
# commands
_ON = 0x03
@@ -399,9 +399,9 @@ class Light(Sensor):
for i in self._regs.keys():
_vals.append(self.bus.read_word_data(self.tsl_addr, self._regs.get(i)))
#for i in _vals:
- # if self.safe_read < i < self.max_read:
+ # if self.safe_read < i < max_read:
# pass
- # elif i >= self.max_read and self.idx < 3:
+ # elif i >= max_read and self.idx < 3:
# idx+=1
# # if excessive reading decrease gain/exposure
# self.n -=1
@@ -448,7 +448,7 @@ class Light(Sensor):
lux = self.nan
# normally broadband maxes out before infrared which makes visible
# drop which is clearly wrong hence:
- elif ch0 == self.max_read or ch1 == self.max_read:
+ elif ch0 == max_read or ch1 == max_read:
lux = self.nan
else:
ratio = ch1/ch0