mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 17:58:50 +01:00
...
This commit is contained in:
parent
bf58f36be9
commit
15f4839a45
@ -91,8 +91,21 @@ class CounterScreen(FullScreen):
|
||||
|
||||
commands.getstatusoutput("echo 0 > /proc/driver/led1")
|
||||
pygame.time.delay(800)
|
||||
commands.getstatusoutput("echo 0 > /proc/driver/led1")
|
||||
commands.getstatusoutput("echo 0 > /proc/driver/led1")
|
||||
|
||||
try:
|
||||
f = open("/proc/driver/led1","w")
|
||||
except IOError:
|
||||
print( "RestoreLastBackLightBrightness open %s failed, try to adjust brightness in Settings" % config.BackLight)
|
||||
pass
|
||||
else:
|
||||
with f:
|
||||
f.seek(0)
|
||||
f.write("0")
|
||||
f.truncate()
|
||||
f.close()
|
||||
|
||||
|
||||
def Init(self):
|
||||
self._CanvasHWND = pygame.Surface((self._Width,self._Height))
|
||||
self._TopLabel = Label()
|
||||
|
||||
@ -104,11 +104,6 @@ def RestoreLastBackLightBrightness(main_screen):
|
||||
gobject.source_remove(gobject_flash_led1)
|
||||
gobject_flash_led1 = -1
|
||||
|
||||
if main_screen._CounterScreen._Counting==True:
|
||||
main_screen._CounterScreen.StopCounter()
|
||||
main_screen.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
return False
|
||||
|
||||
if last_brt == -1:
|
||||
return True
|
||||
@ -131,8 +126,13 @@ def RestoreLastBackLightBrightness(main_screen):
|
||||
last_brt = -1
|
||||
else:
|
||||
f.close()
|
||||
return True
|
||||
|
||||
if main_screen._CounterScreen._Counting==True:
|
||||
main_screen._CounterScreen.StopCounter()
|
||||
main_screen.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def InspectionTeam(main_screen):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user