uniax.Uniax: fixed tolerance

Change-Id: I201c54715ef7f70a164f0f72116c5a8e737c128f
This commit is contained in:
zolliker 2021-10-06 14:18:34 +02:00
parent f491e53f8a
commit 762913012b

View File

@ -78,10 +78,10 @@ class Uniax(Drivable):
return Done return Done
step = 0 step = 0
if self._direction > 0: if self._direction > 0:
if high_value < self._target: if high_value < self._target - self.tolerance:
step = self.step step = self.step
else: else:
if low_value > self._target: if low_value > self._target + self.tolerance:
step = -self.step step = -self.step
if not step: if not step:
if self._direction * (self._target - value) < self.tolerance: if self._direction * (self._target - value) < self.tolerance: