test
This commit is contained in:
parent
d75044f702
commit
e28652a548
|
@ -39,9 +39,8 @@ window = sg.Window('My new window', default_element_size=(12, 1), auto_size_text
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
while True: # Event Loop
|
while True: # Event Loop
|
||||||
event, value = window.ReadNonBlocking()
|
event, value = window.Read(timeout=400)
|
||||||
if event == 'Exit':
|
if event == 'Exit' or event is None:
|
||||||
window.CloseNonBlocking()
|
|
||||||
break
|
break
|
||||||
if value is None:
|
if value is None:
|
||||||
break
|
break
|
||||||
|
@ -50,5 +49,3 @@ while True: # Event Loop
|
||||||
SetLED(window, '_ram_', 'green' if random.randint(1, 10) > 5 else 'red')
|
SetLED(window, '_ram_', 'green' if random.randint(1, 10) > 5 else 'red')
|
||||||
SetLED(window, '_temp_', 'green' if random.randint(1, 10) > 5 else 'red')
|
SetLED(window, '_temp_', 'green' if random.randint(1, 10) > 5 else 'red')
|
||||||
SetLED(window, '_server1_', 'green' if random.randint(1, 10) > 5 else 'red')
|
SetLED(window, '_server1_', 'green' if random.randint(1, 10) > 5 else 'red')
|
||||||
|
|
||||||
time.sleep(.400)
|
|
||||||
|
|
Loading…
Reference in New Issue