-
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
refactor(api): wire protocol engine pick_up_tip to new hardware control function #15469
refactor(api): wire protocol engine pick_up_tip to new hardware control function #15469
Conversation
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.
Tests tests tests! But it lookks good to me otherwise.
78b733a
to
fe6a2b2
Compare
try: | ||
from opentrons.hardware_control.ot3api import OT3API |
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.
You only need to wrap the import statement in the try. The rest of the test logic can be outside the try-except.
Also, is this how we normally run Flex-only tests? Or should the ot3_only
mark be used and it can be expected the import will always work?
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.
try it with the ot3_only
mark, yeah
increment=None, | ||
) | ||
await self.verify_tip_presence(pipette_id, TipPresenceStatus.PRESENT) | ||
if self._state_view.config.robot_type == "OT-3 Standard": |
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.
Could you explain why we need to do this if
/else
on robot_type
? Does the OT-2 HWAPI not behave the same way as the OT-3 HWAPI?
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, we don't want to run verify_tip_presence
for an ot2. We pretty much just want to run the old pick_up_tip
if we have an ot2, and then unconditionally cache the tip.
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.
But this code is calling verify_tip_presence()
on an OT-2, isn't it? Down on line 197?
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.
yeah you're right I think this actually is compatible with ot2
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.
I think we can make the ot-2 stuff more similar to the flex stuff which will reduce complexity
@@ -1152,7 +1152,7 @@ async def update_nozzle_configuration_for_mount( | |||
mount, back_left_nozzle, front_right_nozzle, starting_nozzle | |||
) | |||
|
|||
async def tip_pickup_moves( | |||
async def _tip_pickup_moves( |
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.
I think this can be a public function, no reason not to really
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.
does this have a cache_tip
already also? if not, should add that too
try: | ||
from opentrons.hardware_control.ot3api import OT3API |
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.
try it with the ot3_only
mark, yeah
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.
Looks good to me, nice!
d8ba446
to
46fb25f
Compare
A PR has been opened to address analyses snapshot changes. Please review the changes here: #15513 |
A PR has been opened to address analyses snapshot changes. Please review the changes here: #15513 |
b8addd5
to
e5d1d46
Compare
A PR has been opened to address analyses snapshot changes. Please review the changes here: #15517 |
Overview
Hardware control now has a
tip_pickup_moves
function, which is just the most immediate movement required to pick up a tip, and unlikepick_up_tip
, does not cache a tip in the pipette handler or prepare the pipette for aspiration.This code changes the protocol engine's
pick_up_tip
command to use this new function if a flex is executing the command, and does not change the behavior for an ot2.Test Plan