Skip to content

Commit

Permalink
Merge pull request #825 from elmjag/sardana_limit_0
Browse files Browse the repository at this point in the history
sardana motors: handle limit 0.0 correctly
  • Loading branch information
marcus-oscarsson authored Dec 4, 2023
2 parents 3e2c9dd + 41eeca6 commit 0878ed9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mxcubecore/Command/Sardana.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,11 @@ def init_device(self):
self.info.maxval = float(ranges[-1])
elif int(taurus.Release.version[0]) > 3: # taurus 4 and beyond
minval, maxval = self.attribute.getRange()
if minval:
if minval is not None:
self.info.minval = minval.magnitude
if maxval is not None:
self.info.maxval = maxval.magnitude

except Exception:
import traceback

Expand Down

0 comments on commit 0878ed9

Please sign in to comment.