fehlerkorrektur
This commit is contained in:
parent
a64be6c987
commit
a194ab8aad
@ -135,9 +135,9 @@ class motor():
|
|||||||
def eichen(self):
|
def eichen(self):
|
||||||
if self.aktiv == 0:
|
if self.aktiv == 0:
|
||||||
if pi.read(self.endschalter) == 0:
|
if pi.read(self.endschalter) == 0:
|
||||||
self.vorwaerts(10, 1)
|
self.__vorwaerts(10, 1)
|
||||||
|
|
||||||
self.rueckwaerts(self.schritte_max, 1)
|
self.__rueckwaerts(self.schritte_max, 1)
|
||||||
self.pos = 0
|
self.pos = 0
|
||||||
|
|
||||||
def gehe_zu(self, position):
|
def gehe_zu(self, position):
|
||||||
@ -145,9 +145,9 @@ class motor():
|
|||||||
temp_schritte = int(position) - self.pos
|
temp_schritte = int(position) - self.pos
|
||||||
|
|
||||||
if temp_schritte > 0:
|
if temp_schritte > 0:
|
||||||
self.vorwaerts(temp_schritte)
|
self.__vorwaerts(temp_schritte)
|
||||||
else:
|
else:
|
||||||
self.rueckwaerts(abs(temp_schritte))
|
self.__rueckwaerts(abs(temp_schritte))
|
||||||
|
|
||||||
class motor_bewegen(threading.Thread):
|
class motor_bewegen(threading.Thread):
|
||||||
def __init__(self, motor, position):
|
def __init__(self, motor, position):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user