From 3058a13db9f37a2748fddd2931f230daf6fcad1f Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Sun, 17 Oct 2021 14:07:47 +0200 Subject: [PATCH] debug m3 --- kamera_server.py | 6 +++--- src/schrittmotor.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kamera_server.py b/kamera_server.py index 04fc369..45416f4 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -118,9 +118,9 @@ def motor_test(drehen, pos1, kippen, pos2, zoom, pos3): print('warten') time.sleep(1) - th1 = motor_bewegen(m1, (int(pos1))) - th2 = motor_bewegen(m2, (int(pos2))) - th3 = motor_bewegen(m3, (int(pos3))) + th1 = motor_bewegen(m1, p1) + th2 = motor_bewegen(m2, p2) + th3 = motor_bewegen(m3, p3) th1.join() th2.join() diff --git a/src/schrittmotor.py b/src/schrittmotor.py index bb40d83..2862258 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -104,8 +104,10 @@ class motor(): if self.halten == 1: pi.set_PWM_frequency(self.sp4, self.freq) + + print('Kamera Motor ' + self.name + ' gehe ' + str(schritte) + ' Schritte rückwärts') - for i in range(int(schritte)): + for i in range(schritte): print('Kamera Motor ' + self.name + ' Schritt ' + str(i)) if pi.read(self.endschalter) == 0: print('Endschalter ' + self.name)