|
@@ -151,22 +151,30 @@ class MapperReduceBrightness(MapperNull):
|
151
|
151
|
|
152
|
152
|
# TODO ntptime is setting to UTC, host is on proper timezone
|
153
|
153
|
if useNTP:
|
154
|
|
- # 8pm utc == 10pm cest germany
|
155
|
|
- night = (now[0], now[1], now[2], 20, 0, 0, 0, 0)
|
|
154
|
+ # 6pm utc == 8pm cest germany
|
|
155
|
+ evening = (now[0], now[1], now[2], 18, 0, 0, 0, 0)
|
156
|
156
|
|
157
|
|
- # 5am utc == 7am cest germany
|
158
|
|
- morning = (now[0], now[1], now[2], 5, 0, 0, 0, 0)
|
|
157
|
+ # 0am utc == 2am cest germany
|
|
158
|
+ night = (now[0], now[1], now[2], 0, 0, 0, 0, 0)
|
|
159
|
+
|
|
160
|
+ # 6am utc == 8am cest germany
|
|
161
|
+ morning = (now[0], now[1], now[2], 6, 0, 0, 0, 0)
|
159
|
162
|
else:
|
160
|
|
- # 10pm cest germany
|
161
|
|
- night = (now[0], now[1], now[2], 22, 0, 0, 0, 0)
|
|
163
|
+ # 8pm cest germany
|
|
164
|
+ evening = (now[0], now[1], now[2], 20, 0, 0, 0, 0)
|
|
165
|
+
|
|
166
|
+ # 2am cest germany
|
|
167
|
+ night = (now[0], now[1], now[2], 2, 0, 0, 0, 0)
|
162
|
168
|
|
163
|
|
- # 7am cest germany
|
164
|
|
- morning = (now[0], now[1], now[2], 7, 0, 0, 0, 0)
|
|
169
|
+ # 8am cest germany
|
|
170
|
+ morning = (now[0], now[1], now[2], 8, 0, 0, 0, 0)
|
165
|
171
|
|
166
|
|
- if (now > morning) and (now < night):
|
|
172
|
+ if (now >= morning) and (now < evening):
|
167
|
173
|
self.factor = 1.0
|
168
|
|
- else:
|
|
174
|
+ elif (now >= evening) or (now < night):
|
169
|
175
|
self.factor = 0.42
|
|
176
|
+ else:
|
|
177
|
+ self.factor = 0.1
|
170
|
178
|
|
171
|
179
|
def buttons(self):
|
172
|
180
|
keys = self.input.get()
|