aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor_unified.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/monitor_unified.py b/monitor_unified.py
index 0d9b9dc..dcae8de 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:
- max_read = 65535
+ self.max_read = 65535
# on exposure 100ms:
- max_read_1 = 37177
+ self.max_read_1 = 37177
# on exposure 13.7ms:
- max_read_2 = 5047
+ self.max_read_2 = 5047
# commands
_ON = 0x03
@@ -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 == max_read or ch1 == max_read:
+ elif ch0 == self.max_read or ch1 == self.max_read:
lux = self.nan
else:
ratio = ch1/ch0