mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-06-06 01:48:43 +02:00
fix(sim positioner): do not emit values within tolerance limit
This commit is contained in:
@@ -146,8 +146,12 @@ class SimPositioner(Device, PositionerBase):
|
||||
def _update_state(self, val):
|
||||
"""Update the state of the simulated device."""
|
||||
old_readback = self._get_sim_state(self.readback.name)
|
||||
|
||||
self._set_sim_state(self.readback.name, val)
|
||||
|
||||
if np.isclose(old_readback, val, atol=self.tolerance.get()):
|
||||
return
|
||||
|
||||
# Run subscription on "readback"
|
||||
self._run_subs(
|
||||
sub_type=self.SUB_READBACK,
|
||||
|
||||
Reference in New Issue
Block a user