added alarmOn/Off Setting
This commit is contained in:
parent
28395a9138
commit
0b219d1236
@ -42,7 +42,11 @@ class ClockScreen():
|
|||||||
return
|
return
|
||||||
self.light = not self.light
|
self.light = not self.light
|
||||||
elif button == 2:
|
elif button == 2:
|
||||||
|
if pushDownTime > 700:
|
||||||
Settings.selectedColor=(Settings.selectedColor+1)%len(ClockScreen.COLORS)
|
Settings.selectedColor=(Settings.selectedColor+1)%len(ClockScreen.COLORS)
|
||||||
|
else:
|
||||||
|
Settings.alarmOn = not Settings.alarmOn
|
||||||
|
Settings.save()
|
||||||
HW.housingLEDs.fill([int(c/255*ClockScreen.BRIGHTNESS[Settings.selectedBrightness]) for c in ClockScreen.COLORS[Settings.selectedColor]] if self.light else (0,0,0))
|
HW.housingLEDs.fill([int(c/255*ClockScreen.BRIGHTNESS[Settings.selectedBrightness]) for c in ClockScreen.COLORS[Settings.selectedColor]] if self.light else (0,0,0))
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ def save():
|
|||||||
wf.write("selectedSound="+str(selectedSound)+"\n")
|
wf.write("selectedSound="+str(selectedSound)+"\n")
|
||||||
elif l.startswith("alarmTime"):
|
elif l.startswith("alarmTime"):
|
||||||
wf.write("alarmTime="+str(alarmTime)+"\n")
|
wf.write("alarmTime="+str(alarmTime)+"\n")
|
||||||
|
elif l.startswith("alarmOn"):
|
||||||
|
wf.write("alarmTime="+str(alarmOn)+"\n")
|
||||||
elif l.startswith("selectedColor"):
|
elif l.startswith("selectedColor"):
|
||||||
wf.write("selectedColor="+str(selectedColor)+"\n")
|
wf.write("selectedColor="+str(selectedColor)+"\n")
|
||||||
elif l.startswith("selectedBrightness"):
|
elif l.startswith("selectedBrightness"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user