warten bis bewegung fertig
This commit is contained in:
parent
a194ab8aad
commit
a89f4bb131
@ -94,19 +94,31 @@ def action(changePin, action):
|
||||
@kamera_server.route("/position/<drehen>/<pos1>/<kippen>/<pos2>/<zoom>/<pos3>")
|
||||
def motor_test(drehen, pos1, kippen, pos2, zoom, pos3):
|
||||
if drehen == "drehen":
|
||||
#m1.gehe_zu(int(position))
|
||||
th1 = motor_bewegen(m1, (int(pos1)))
|
||||
#th1.join()
|
||||
p1 = int(pos1)
|
||||
else:
|
||||
p1 = m1.pos
|
||||
|
||||
if kippen == "kippen":
|
||||
#m1.gehe_zu(int(position))
|
||||
th2 = motor_bewegen(m2, (int(pos2)))
|
||||
#th2.join()
|
||||
p2 = int(pos2)
|
||||
else:
|
||||
p2 = m2.pos
|
||||
|
||||
if zoom == "zoom":
|
||||
#m1.gehe_zu(int(position))
|
||||
th3 = motor_bewegen(m3, (int(pos3)))
|
||||
#th3.join()
|
||||
p3 = int(pos3)
|
||||
else:
|
||||
p3 = m3.pos
|
||||
|
||||
while m1.aktiv == 1 or m2.aktiv == 1 or m3.aktiv == 1:
|
||||
print('warten')
|
||||
time.sleep(1)
|
||||
|
||||
th1 = motor_bewegen(m1, (int(pos1)))
|
||||
th2 = motor_bewegen(m2, (int(pos2)))
|
||||
th3 = motor_bewegen(m3, (int(pos3)))
|
||||
|
||||
th1.join()
|
||||
th2.join()
|
||||
th3.join()
|
||||
|
||||
return 'Drehen: ' + str(m1.pos) + ', Kippen: ' + str(m2.pos) + ', Zoom: ' + str(m3.pos)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user