Add a Valve class #245
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Valve device type in nslsii/devices.py, intended to support “valve functionality” by adding a stop() hook similar to the shutter behavior.
Changes:
- Adds a new
Valveclass inheriting fromTwoButtonShutter. - Introduces a
Valve.stop()method placeholder.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
By my count we have a version of this at HEX, ISS, SRX, QAS, CHX, SIX, and LIX |
| self._set_st = None | ||
| self.read_attrs = ['status'] | ||
|
|
||
| class Valve(TwoButtonShutter): |
There was a problem hiding this comment.
At least at SRX we are (were?) using this for the a photon shutter, I think we need a better name.
There was a problem hiding this comment.
so something that captures, valves + photon shutters?
There was a problem hiding this comment.
The interesting property is that "does not close on stop", putting more in a normal comment.
|
I would propose the following names |
|
|
||
|
|
||
| class TwoButtonActuatorAutoClose(TwoButtonActuator): | ||
| def stop(self, *, success=False): |
There was a problem hiding this comment.
This now does not close despite the name.
The default stop method is a no-op so we should move the stop from the other class to this one.
There was a problem hiding this comment.
I am not sure if I just made it worse.
Not sure if this is too much of a naive approach to the fix we did at SMI with Eliot.
Adds stop function to help with valve functionality.