wcurrent and daily weather added
This commit is contained in:
29
server.py
29
server.py
@@ -278,8 +278,8 @@ def matrix():
|
||||
|
||||
|
||||
LastCommand = 'Run display'
|
||||
if "Run News" in request.form:
|
||||
pass
|
||||
elif "Run News" in request.form:
|
||||
|
||||
print('run display')
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('N')
|
||||
@@ -288,8 +288,27 @@ def matrix():
|
||||
|
||||
|
||||
LastCommand = 'Run display'
|
||||
elif "Stop Display (at next refresh)" in request.form:
|
||||
pass
|
||||
elif "Run Weather" in request.form:
|
||||
|
||||
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('W')
|
||||
|
||||
print('back in flask')
|
||||
|
||||
|
||||
LastCommand = 'Run display'
|
||||
elif "Run Daily Weather" in request.form:
|
||||
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('D')
|
||||
|
||||
print('back in flask')
|
||||
|
||||
|
||||
LastCommand = 'Run display'
|
||||
elif "Stop Display" in request.form:
|
||||
|
||||
print('run display')
|
||||
#ticker.kill()
|
||||
try:
|
||||
@@ -299,7 +318,7 @@ def matrix():
|
||||
except:
|
||||
print("none running")
|
||||
elif "Shutdown the pi" in request.form:
|
||||
pass
|
||||
|
||||
try:
|
||||
LastCommand = 'shutdown'
|
||||
os.system("sudo shutdown now")
|
||||
|
Reference in New Issue
Block a user