Update main.py
parent
93ce452ad7
commit
5aa3e171d1
4
main.py
4
main.py
|
@ -81,6 +81,10 @@ def read_idle():
|
||||||
|
|
||||||
def change_idle_mode(channel):
|
def change_idle_mode(channel):
|
||||||
global idle_mode
|
global idle_mode
|
||||||
|
with open('./idle.txt', 'r') as f:
|
||||||
|
idle_mode = f.readline()
|
||||||
|
if int(idle_mode) > 7:
|
||||||
|
idle_mode = 0
|
||||||
with open('./idle.txt', 'w') as f:
|
with open('./idle.txt', 'w') as f:
|
||||||
f.write(int(idle_mode) + 1)
|
f.write(int(idle_mode) + 1)
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
|
|
Loading…
Reference in New Issue