added alarmOn/Off Setting
This commit is contained in:
parent
28395a9138
commit
0b219d1236
@ -42,7 +42,11 @@ class ClockScreen():
|
||||
return
|
||||
self.light = not self.light
|
||||
elif button == 2:
|
||||
if pushDownTime > 700:
|
||||
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))
|
||||
|
||||
|
||||
|
@ -21,6 +21,8 @@ def save():
|
||||
wf.write("selectedSound="+str(selectedSound)+"\n")
|
||||
elif l.startswith("alarmTime"):
|
||||
wf.write("alarmTime="+str(alarmTime)+"\n")
|
||||
elif l.startswith("alarmOn"):
|
||||
wf.write("alarmTime="+str(alarmOn)+"\n")
|
||||
elif l.startswith("selectedColor"):
|
||||
wf.write("selectedColor="+str(selectedColor)+"\n")
|
||||
elif l.startswith("selectedBrightness"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user