From bb8213171e37e8871e46d6a860c231289c299247 Mon Sep 17 00:00:00 2001 From: erg_samowzbudnik Date: Sun, 13 Jun 2021 10:56:02 +0200 Subject: added self to max_read in light class --- monitor_unified.py | 8 ++++---- 1 file 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 -- cgit v1.2.3-65-gdbad