diff --git a/kamera_server.py b/kamera_server.py index 614e6dd..04fc369 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -50,7 +50,10 @@ def main(): # Put the pin dictionary into the template data dictionary: templateData = { 'pins' : pins_out, - 'pins_in' : pins_in + 'pins_in' : pins_in, + 'pos_1' : str(m1.pos), + 'pos_2' : str(m2.pos), + 'pos_3' : str(m3.pos) } # Pass the template data into the template main.html and return it to the user return render_template('main.html', **templateData) @@ -86,7 +89,10 @@ def action(changePin, action): # Along with the pin dictionary, put the message into the template data dictionary: templateData = { 'pins' : pins_out, - 'pins_in' : pins_in + 'pins_in' : pins_in, + 'pos_1' : str(m1.pos), + 'pos_2' : str(m2.pos), + 'pos_3' : str(m3.pos) } return render_template('main.html', **templateData) @@ -128,7 +134,15 @@ def motor_eichen(): m2.eichen() m3.eichen() - return 'fahre Motoren auf Startposition' + templateData = { + 'pins' : pins_out, + 'pins_in' : pins_in, + 'pos_1' : str(m1.pos), + 'pos_2' : str(m2.pos), + 'pos_3' : str(m3.pos) + } + + return render_template('main.html', **templateData) if __name__ == "__main__": kamera_server.run(host='0.0.0.0')