-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(api): add liquid state property #15553
Conversation
A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/ |
ee5df52
to
2adb717
Compare
A PR has been opened to address analyses snapshot changes. Please review the changes here: #15554 |
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.
Couple comments. I may be confused as to what distinguishes this from InstrumentContext.liquid_detection
, so ignore me if I'm off base.
@@ -1642,6 +1643,16 @@ def flow_rate(self) -> "FlowRates": | |||
""" | |||
return self._core.get_flow_rate() | |||
|
|||
@property | |||
@requires_version(2, 0) |
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.
2.20, no?
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.
yep ty
def liquid_presence_state(self) -> Optional[types.LiquidPresenceState]: | ||
return self._liquid_presence_state | ||
|
||
@liquid_presence_state.setter |
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.
Would we want a public setter, or should this always be driven by sensor measurements?
But you raise a good point in that now that we're adding to this it would be good to update that name to |
A PR has been opened to address analyses snapshot changes. Please review the changes here: #15554 |
whoopsie duplicate ticket |
Overview
This adds a
liquid_presence_state
property to the protocol api's instrument context, along with an enum for the possible states.The value here is
Optional
and defaulted toNone
, which I think makes sense for the ot2 case.Changelog
liquid_presence_state
LiquidPresenceState
enum inopentrons.types
Review Requests
Is there any further error handling/prevention I should do for ot2 instruments?