aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerg_samowzbudnik <uinarf@autistici.org>2021-06-13 11:02:17 +0200
committererg_samowzbudnik <uinarf@autistici.org>2021-06-13 11:02:17 +0200
commitf945953ac007b8c98d05e578bbc931a0c69a4a51 (patch)
tree0f5f48146ea899ae4acaabfe302125ba7f321f5b
parentbb8213171e37e8871e46d6a860c231289c299247 (diff)
downloadRPGH-f945953ac007b8c98d05e578bbc931a0c69a4a51.tar.gz
RPGH-f945953ac007b8c98d05e578bbc931a0c69a4a51.tar.bz2
RPGH-f945953ac007b8c98d05e578bbc931a0c69a4a51.zip
deleted self from max_read in light class ...
-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