Skip to content

Commit

Permalink
Merge f97d822 into 888b308
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jan 31, 2020
2 parents 888b308 + f97d822 commit 8bf9139
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apstools/devices.py
Expand Up @@ -1184,10 +1184,16 @@ def set_lim(self, low, high):
Similar with SPEC command
"""
if not self.moving:
lo = min(low, high)
hi = max(low, high)
# update EPICS
yield from bps.mv(
self.soft_limit_lo, min(low, high),
self.soft_limit_hi, max(low, high),
)
# update ophyd metadata dictionary
self.user_setpoint._metadata["lower_ctrl_limit"] = lo
self.user_setpoint._metadata["upper_ctrl_limit"] = hi


class EpicsMotorServoMixin(DeviceMixinBase):
Expand Down

0 comments on commit 8bf9139

Please sign in to comment.