news lag fixes and professional demo added to server
This commit is contained in:
26
server.py
26
server.py
@@ -185,27 +185,6 @@ def SetWeather():
|
||||
|
||||
return hello()
|
||||
|
||||
@app.route("/DisplayImage", methods=['POST'])
|
||||
def DisplayImage():
|
||||
if request.method == 'POST':
|
||||
if 'file' not in request.files:
|
||||
print('No file attached in request')
|
||||
return hello()
|
||||
fle = request.files['file']
|
||||
if fle.filename == '':
|
||||
print('No file selected')
|
||||
return hello()
|
||||
if fle and allowed_file(fle.filename):
|
||||
filename = 'user_image.ppm'
|
||||
|
||||
fle.save(os.path.join(os.path.dirname(os.path.abspath(__file__)),os.path.join('display_images', filename)))
|
||||
global LastCommand
|
||||
LastCommand = 'Add a new logo file'
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('I')
|
||||
return hello()
|
||||
return hello()
|
||||
|
||||
@app.route("/DisplayGIF", methods=['POST'])
|
||||
def DisplayGIF():
|
||||
|
||||
@@ -312,6 +291,11 @@ def matrix():
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('t')
|
||||
|
||||
elif "Professional" in request.form:
|
||||
|
||||
ticker.sendline('K')
|
||||
ticker.sendline('b')
|
||||
|
||||
elif "All" in request.form:
|
||||
|
||||
ticker.sendline('K')
|
||||
|
Reference in New Issue
Block a user