Motor Pos in html eingefügt
This commit is contained in:
		@@ -50,7 +50,10 @@ def main():
 | 
				
			|||||||
    # Put the pin dictionary into the template data dictionary:
 | 
					    # Put the pin dictionary into the template data dictionary:
 | 
				
			||||||
    templateData = {
 | 
					    templateData = {
 | 
				
			||||||
        'pins' : pins_out,
 | 
					        '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
 | 
					    # Pass the template data into the template main.html and return it to the user
 | 
				
			||||||
    return render_template('main.html', **templateData)
 | 
					    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:
 | 
					    # Along with the pin dictionary, put the message into the template data dictionary:
 | 
				
			||||||
    templateData = {
 | 
					    templateData = {
 | 
				
			||||||
        'pins' : pins_out,
 | 
					        '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)
 | 
					    return render_template('main.html', **templateData)
 | 
				
			||||||
@@ -128,7 +134,15 @@ def motor_eichen():
 | 
				
			|||||||
    m2.eichen()
 | 
					    m2.eichen()
 | 
				
			||||||
    m3.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__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    kamera_server.run(host='0.0.0.0')
 | 
					    kamera_server.run(host='0.0.0.0')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user