+
+
+
diff --git a/logger/PyLog.txt b/logger/PyLog.txt index a60cdc1..7e1c6aa 100644 --- a/logger/PyLog.txt +++ b/logger/PyLog.txt @@ -40,4 +40,5 @@ Caught error: 'NoneType' object has no attribute 'decode' at time: 2021-03-19 11 Program end. Ctrl+C from user at time: 2021-03-19 12:48:01.838556 Program end. Ctrl+C from user at time: 2021-03-19 12:49:41.004201 Program end. Ctrl+C from user at time: 2021-03-19 12:53:27.063207 -Program end. Ctrl+C from user at time: 2021-03-19 15:00:27.908197 \ No newline at end of file +Program end. Ctrl+C from user at time: 2021-03-19 15:00:27.908197 +Program end. Ctrl+C from user at time: 2021-03-19 15:24:20.079220 \ No newline at end of file diff --git a/server/FlythisServer.py b/server/FlythisServer.py index 68d5903..6a3da39 100644 --- a/server/FlythisServer.py +++ b/server/FlythisServer.py @@ -34,7 +34,7 @@ flaskApp = Flask(__name__) #funzione main: passa al template html i primi dati che dovranno popolarlo. legge direttamente da redis. edit: passa anche indirizzo ip del server def main(): channelsData = { - 'title' : 'Flythis', + 'title' : 'Home', 'timeSrv' : redSrv0.get('RTDATA:CH:SRVTIME').decode('utf-8'), 'timeLog' : redSrv0.get('RTDATA:CH:RECTIME').decode('utf-8'), 'Ch0' : redSrv0.get('RTDATA:CH:0').decode('utf-8'), @@ -47,7 +47,47 @@ def main(): 'Ch7' : redSrv0.get('RTDATA:CH:7').decode('utf-8') } #assegno il template html di riferimento - return render_template('FlythisTrap.html', **channelsData) + return render_template('home.html', **channelsData) + + +@flaskApp.route("/logger") +#funzione main: passa al template html i primi dati che dovranno popolarlo. legge direttamente da redis. edit: passa anche indirizzo ip del server +def logger(): + channelsData = { + 'title' : 'logger', + 'timeSrv' : redSrv0.get('RTDATA:CH:SRVTIME').decode('utf-8'), + 'timeLog' : redSrv0.get('RTDATA:CH:RECTIME').decode('utf-8'), + 'Ch0' : redSrv0.get('RTDATA:CH:0').decode('utf-8'), + 'Ch1' : redSrv0.get('RTDATA:CH:1').decode('utf-8'), + 'Ch2' : redSrv0.get('RTDATA:CH:2').decode('utf-8'), + 'Ch3' : redSrv0.get('RTDATA:CH:3').decode('utf-8'), + 'Ch4' : redSrv0.get('RTDATA:CH:4').decode('utf-8'), + 'Ch5' : redSrv0.get('RTDATA:CH:5').decode('utf-8'), + 'Ch6' : redSrv0.get('RTDATA:CH:6').decode('utf-8'), + 'Ch7' : redSrv0.get('RTDATA:CH:7').decode('utf-8') + } + #assegno il template html di riferimento + return render_template('logger.html', **channelsData) + + +@flaskApp.route("/setup") +#funzione main: passa al template html i primi dati che dovranno popolarlo. legge direttamente da redis. edit: passa anche indirizzo ip del server +def setup(): + channelsData = { + 'title' : 'setup', + 'timeSrv' : redSrv0.get('RTDATA:CH:SRVTIME').decode('utf-8'), + 'timeLog' : redSrv0.get('RTDATA:CH:RECTIME').decode('utf-8'), + 'Ch0' : redSrv0.get('RTDATA:CH:0').decode('utf-8'), + 'Ch1' : redSrv0.get('RTDATA:CH:1').decode('utf-8'), + 'Ch2' : redSrv0.get('RTDATA:CH:2').decode('utf-8'), + 'Ch3' : redSrv0.get('RTDATA:CH:3').decode('utf-8'), + 'Ch4' : redSrv0.get('RTDATA:CH:4').decode('utf-8'), + 'Ch5' : redSrv0.get('RTDATA:CH:5').decode('utf-8'), + 'Ch6' : redSrv0.get('RTDATA:CH:6').decode('utf-8'), + 'Ch7' : redSrv0.get('RTDATA:CH:7').decode('utf-8') + } + #assegno il template html di riferimento + return render_template('setup.html', **channelsData) # definisco una NUOVA route a cui rispondere su chiamta in metodo GET x restituire dati aggiornati @flaskApp.route("/api/v1/channels/all", methods=['GET']) diff --git a/server/templates/FlythisTrap.html b/server/templates/FlythisTrap.html index 93ea45f..69ddc70 100644 --- a/server/templates/FlythisTrap.html +++ b/server/templates/FlythisTrap.html @@ -14,7 +14,7 @@
+ + + + + + + +