From 36653ef850a042825c84edb9be57822cdcc927fe Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Sat, 23 Dec 2023 01:05:28 +0000 Subject: [PATCH] Preload Fonts, Backend Cleanup --- backend/python/backend.py | 16 +++------------- simplepwa/index.html | 30 +----------------------------- simplepwa/style.css | 1 + 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/backend/python/backend.py b/backend/python/backend.py index 86ed905..1441596 100644 --- a/backend/python/backend.py +++ b/backend/python/backend.py @@ -5,18 +5,8 @@ import re app = Flask(__name__) name = "Aviation Assistant v2" software_version = "v.1.0.0" -tar1090_version = "N/A" -dump1090_version = "N/A" - -@app.route('/brightness',methods = ['POST']) -def brightness(): - if request.method == 'POST': - json = request.get_json() - if json['level'] < 255 and json['level'] > 15: - status = os.popen('echo '+str(json['level'])+' > /sys/class/backlight/rpi_backlight/brightness').read() - elif json['level'] == 256: - status = os.popen('sudo cat /sys/class/backlight/rpi_backlight/brightness').read() - return status +tar1090_version = "dafba99" +dump1090_version = "a80ba8f" @app.route('/information',methods = ['GET']) def information(): @@ -37,7 +27,7 @@ def information(): "wifi_ip": ip[:-1], "bluetooth_ip": bt_ip[:-1], "dump1090_version": dump1090_version, - "bt_connection": "CONNECTED" if bt_connection else "N/A", + "bt_connection": "CONNECTED" if bt_connection else "DISCONNECTED", "tar1090_version": tar1090_version, "wifi_network": wifi_network[0] } diff --git a/simplepwa/index.html b/simplepwa/index.html index 21b3f7a..df7908f 100644 --- a/simplepwa/index.html +++ b/simplepwa/index.html @@ -6,7 +6,7 @@ Aviation Assistant V2 - + @@ -98,34 +98,6 @@ - -
-
-

Wifi Settings

-
-
-
-
- - -
-
- -
-
- - -
-
-
- -
-

diff --git a/simplepwa/style.css b/simplepwa/style.css index e075fad..f3e8a9e 100644 --- a/simplepwa/style.css +++ b/simplepwa/style.css @@ -1,6 +1,7 @@ @font-face { font-family: SF-Pro; src: url("./SF-Pro.ttf"); + font-display: swap; } html * {