-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add j120k flowswitch, insert flow switch in appropriate classes. #1189
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
175cf6d
ENH: add j120k flowswitch, insert flow switch in appropriate classes.
b4c44e6
BUG: missing a colon
c9676d1
DOC: add release notes
b42a24c
DOC: add release notes
d2a433a
DOC: add release notes
31758f5
DOC: fix typo
1681526
ENH: make J120K flow getter return a bool
8bc6977
DOC: sphinxed some docs
c7518e4
ENH: remove unesscessary getter function
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
1189 flow-switch | ||
################# | ||
|
||
API Breaks | ||
---------- | ||
- N/A | ||
|
||
Features | ||
-------- | ||
- pcdsdevices now has a `digital_signals` module for simple digital io. | ||
|
||
Device Updates | ||
-------------- | ||
- added `J120K` to `SxrTestAbsorber`, `XPIM`, `IM2K0`, `PowerSlits` | ||
|
||
New Devices | ||
----------- | ||
- `PPMCoolSwitch` ppms with cooling switch not a meter. | ||
- `WaveFrontSensorTargetCool` WaveFrontSensors with a cooling switch. | ||
- `J120K` a device class for a cooling switch. | ||
|
||
Bugfixes | ||
-------- | ||
- N/A | ||
|
||
Maintenance | ||
----------- | ||
- N/A | ||
|
||
Contributors | ||
------------ | ||
- nrwslac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from ophyd import Component as Cpt | ||
from ophyd import Device | ||
|
||
from .interface import BaseInterface | ||
from .signal import PytmcSignal | ||
|
||
|
||
class J120K(BaseInterface, Device): | ||
""" | ||
A class representing the J120K 24V dry contact cooling flow switch. | ||
""" | ||
flow_ok = Cpt(PytmcSignal, ':FSW:FLOW_OK', io='i', | ||
kind='normal', doc='flow rate nominal') | ||
|
||
@property | ||
def get_flow_ok(self): | ||
""" | ||
returns True if flow rate is nominal | ||
""" | ||
return bool(self.flow_ok.get()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more thoughts, though I'm totally splitting hairs at this point:
flow_ok.get()
insufficient as an API? (I do see that it returns an int and not a bool)get_flow_ok()
call which will give an annoying "typebool
is not callable" sort of error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually totally true, I did this myself. I'll delete it. I thought people would want a designated function, but in this case it should drop the property tag. I also did not think about the fact that you can just call get on the signal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, sounds good- I would have been fine with any outcome here, just trying to make sure we consider these small details