-
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, robot-server, app): Handle the Plate Reader lid while held by the gripper when the Estop is pressed. #16574
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
369bb40
save
vegano1 b7b989f
Merge branch 'edge' into PLAT-451-handle-estop-with-plate-reader
vegano1 d42b4ba
save
vegano1 893da7a
working place labware command
vegano1 2fcce8e
feat(api): add unsafe/placeLabware command to place labware the gripp…
vegano1 0e201e0
feat(robot-server): add placeLabwareState and estopEngaged to runs/cu…
vegano1 3ae5e2f
clean up
vegano1 f0b4766
format
vegano1 a35161b
api, always move the plate reader lid to its dock
vegano1 c7e8264
feat(app, shared-data): add usePlacePlateReaderLid to EstopPressedMod…
vegano1 2a7a4b4
save
vegano1 2cb3765
conditionally call unsafe/placeLabware command based on the runs/curr…
vegano1 837fe9a
simplify usePlacePlateReaderLid hook
vegano1 74b02cc
Merge branch 'edge' into PLAT-451-handle-estop-with-plate-reader
vegano1 6861d3d
fix bad edge merge
vegano1 6c4de3e
move EstopTakeover component below maintenanceRunTakeover so we dont …
vegano1 de39cbe
refactor estopPressed
vegano1 3dee541
clean up
vegano1 39fb23c
Merge branch 'edge' into PLAT-451-handle-estop-with-plate-reader
vegano1 ddc24cb
default the filename arg of absorbance read command to None
vegano1 d9f9175
format
vegano1 337b515
add unit tests
vegano1 6fe1b96
format
vegano1 2da1b7a
Merge branch 'edge' into PLAT-451-handle-estop-with-plate-reader
vegano1 2023531
cleanup
vegano1 8c96485
format
vegano1 8cf7a54
formatr
vegano1 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
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
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 |
---|---|---|
|
@@ -449,9 +449,10 @@ def load_module( | |
|
||
# When the protocol engine is created, we add Module Lids as part of the deck fixed labware | ||
# If a valid module exists in the deck config. For analysis, we add the labware here since | ||
# deck fixed labware is not created under the same conditions. | ||
if self._engine_client.state.config.use_virtual_modules: | ||
self._load_virtual_module_lid(module_core) | ||
# deck fixed labware is not created under the same conditions. We also need to inject the Module | ||
# lids when the module isnt already on the deck config, like when adding a new | ||
# module during a protocol setup. | ||
self._load_virtual_module_lid(module_core) | ||
|
||
self._module_cores_by_id[module_core.module_id] = module_core | ||
|
||
|
@@ -461,20 +462,24 @@ def _load_virtual_module_lid( | |
self, module_core: Union[ModuleCore, NonConnectedModuleCore] | ||
) -> None: | ||
if isinstance(module_core, AbsorbanceReaderCore): | ||
lid = self._engine_client.execute_command_without_recovery( | ||
cmd.LoadLabwareParams( | ||
loadName="opentrons_flex_lid_absorbance_plate_reader_module", | ||
location=ModuleLocation(moduleId=module_core.module_id), | ||
namespace="opentrons", | ||
version=1, | ||
displayName="Absorbance Reader Lid", | ||
) | ||
substate = self._engine_client.state.modules.get_absorbance_reader_substate( | ||
module_core.module_id | ||
) | ||
if substate.lid_id is None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good, should provide coverage for the current run setup bug. |
||
lid = self._engine_client.execute_command_without_recovery( | ||
cmd.LoadLabwareParams( | ||
loadName="opentrons_flex_lid_absorbance_plate_reader_module", | ||
location=ModuleLocation(moduleId=module_core.module_id), | ||
namespace="opentrons", | ||
version=1, | ||
displayName="Absorbance Reader Lid", | ||
) | ||
) | ||
|
||
self._engine_client.add_absorbance_reader_lid( | ||
module_id=module_core.module_id, | ||
lid_id=lid.labwareId, | ||
) | ||
self._engine_client.add_absorbance_reader_lid( | ||
module_id=module_core.module_id, | ||
lid_id=lid.labwareId, | ||
) | ||
|
||
def _create_non_connected_module_core( | ||
self, load_module_result: LoadModuleResult | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
What does it mean when we
deactivate
the module now?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 context of modules, the
deactivate
function means we stop whatever target action we are doing, such as heating, shaking, etc. We don't have any actions other than reading for the plate reader, but these happen relatively quickly, so we don't have to worry about them. The problem here was that I thought deactivate meant stop and disconnect the module, which is not correct asdeactivate
gets called when the estop is pressed. In the case of the plate reader it would disconnect and reconnect when the estop was pressed. This change fixes that behavior by removing the stop and disconnect to thecleanup
method.