-
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
fix(api): Fix liquid getting homed into pipette after certain protocols end #17285
fix(api): Fix liquid getting homed into pipette after certain protocols end #17285
Conversation
if drop_tips_after_run: | ||
await self._drop_tip() | ||
await self._hardware_api.stop(home_after=home_after_stop) | ||
else: | ||
await self._hardware_api.stop(home_after=False) | ||
if home_after_stop: | ||
await self._home_everything_except_plungers() | ||
await self._try_to_drop_tips() | ||
|
||
await self._hardware_api.stop(home_after=False) | ||
|
||
if home_after_stop: | ||
await self._home_everything_except_plungers() |
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.
In the old code:
if drop_tips_after_run:
await self._drop_tip()
await self._hardware_api.stop(home_after=home_after_stop)
If home_after_stop
was True
, the self._hardware_api.stop(...)
call would home everything, including the plungers.
I think this used to be safe when this code was originally written. The line immediately preceding it, self._drop_tip()
, would have ensured that there were no tips attached, and therefore no liquid for the home to accidentally aspirate.
But that assumption stopped holding for Flex protocols with PAPIv≥2.16; since then, self._drop_tip()
has been a no-op (see the comments in _try_to_drop_tips()
.) So this self._hardware_api.stop(...)
was accidentally homing with tips possibly still attached and liquid possibly still in them.
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.
With my fix here, nothing in this file should ever home the plungers anymore.
We could try to be a little fancier than that. We could home the plungers specifically in the cases where the robot did drop tips. I haven't done that here because it doesn't seem worth the complexity. The plungers will home when the next run begins, anyway.
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.
no, i agree with this fix. let's just not home the damn things, it's too hard to pick the right behavior
cfb9072
to
1137f00
Compare
if drop_tips_after_run: | ||
await self._drop_tip() | ||
await self._hardware_api.stop(home_after=home_after_stop) | ||
else: | ||
await self._hardware_api.stop(home_after=False) | ||
if home_after_stop: | ||
await self._home_everything_except_plungers() | ||
await self._try_to_drop_tips() | ||
|
||
await self._hardware_api.stop(home_after=False) | ||
|
||
if home_after_stop: | ||
await self._home_everything_except_plungers() |
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.
no, i agree with this fix. let's just not home the damn things, it's too hard to pick the right behavior
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.
Wooooo! This works! I can confirm that running a protocol on 8.2 repros the issue, and running your branch does not cause any liquid aspiration on home.
That PR changed the stop behavior on OT-2 to fix some bugs but the tests didn't get changed. Fix the tests.
Overview
Closes RESC-345.
Test Plan and Hands on Testing
Run a PAPIv≥2.16 protocol on a Flex. Cancel it at a point when tips are attached and contain liquid. Without this PR, the pipette should accidentally aspirate when it homes, as shown in this video. With this PR, it should not do that; the liquid should remain in place. Ideally, use food dye to confirm this, because it can be difficult to notice.
Changelog
See comments.
Review requests
See comments.
Risk assessment
Medium.