Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyDMSpinBox always takes limits from PV even when user defined limits are set #903

Closed
jbellister-slac opened this issue Aug 9, 2022 · 0 comments · Fixed by #935
Closed
Assignees

Comments

@jbellister-slac
Copy link
Collaborator

The PyDMSpinBox will always set the maximum and minimum values to display based on the HOPR/LOPR fields of the PV:

def ctrl_limit_changed(self, which, new_limit):
"""
Callback invoked when the Channel receives new control limit
values.
Parameters
----------
which : str
Which control limit was changed. "UPPER" or "LOWER"
new_limit : float
New value for the control limit
"""
super(PyDMSpinbox, self).ctrl_limit_changed(which, new_limit)
if which == "UPPER":
self.setMaximum(new_limit)
else:
self.setMinimum(new_limit)

This happens even if the user sets their own limits in designer. And in the case HOPR/LOPR are not defined then it will set minimum and maximum both to zero so that the spinbox cannot display anything other than zero.

We should create an option that is surfaced in designer for taking limits from the PV only if the user wants this behavior. Should keep this option consistent with other widgets as per #577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant