Update main.py
parent
29b87768b0
commit
7f64d6e218
4
main.py
4
main.py
|
@ -73,6 +73,7 @@ def led_power_toggle(channel):
|
||||||
else:
|
else:
|
||||||
led_power = True
|
led_power = True
|
||||||
print('Led toggled: '+str(led_power))
|
print('Led toggled: '+str(led_power))
|
||||||
|
return led_power
|
||||||
|
|
||||||
def read_idle():
|
def read_idle():
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
|
@ -100,7 +101,6 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
idle_mode = f.readline()
|
idle_mode = f.readline()
|
||||||
|
@ -110,7 +110,7 @@ if __name__ == '__main__':
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
idle_mode = f.readline()
|
idle_mode = f.readline()
|
||||||
|
|
||||||
if led_power == False:
|
if led_power_toggle == False:
|
||||||
setColor(strip, Color(0,0,0))
|
setColor(strip, Color(0,0,0))
|
||||||
else:
|
else:
|
||||||
if check_internet() == False:
|
if check_internet() == False:
|
||||||
|
|
Loading…
Reference in New Issue