From eb63350ce667b8b71bc85e091ec0b29160beecac Mon Sep 17 00:00:00 2001 From: Pete R Jemian Date: Thu, 24 Oct 2024 13:42:33 -0500 Subject: [PATCH] MNT #1025 as-suggested --- apstools/devices/positioner_soft_done.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apstools/devices/positioner_soft_done.py b/apstools/devices/positioner_soft_done.py index 666a8639..54367aba 100644 --- a/apstools/devices/positioner_soft_done.py +++ b/apstools/devices/positioner_soft_done.py @@ -153,15 +153,13 @@ def cleanup(self): self.readback.unsubscribe_all() self.setpoint.unsubscribe_all() - # fmt: off @property def actual_tolerance(self): - return ( - self.tolerance.get() - if self.tolerance.get() >= 0 - else 10 ** (-1 * self.precision) - ) - # fmt: on + tolerance = self.tolerance.get() + if tolerance < 0: + # Use EPICS-defined precision. + tolerance = 10 ** (-1 * self.precision) + return tolerance def cb_update_target(self, value, *args, **kwargs): self.target.put(value)