Skip to content
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(protocol-designer): getIsSlotEmpty logic util fix for modules and… #14188

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Dec 13, 2023

… labware

Overview

Followup to my last PR that was fixing the getIsSlotEmpty logic for the addressable areas. This PR fixes the logic for labware and modules since i noticed there were still issues with some slots not being full but the util thinking they are full.

Test Plan

First test with creating an ot-2 protocol. Mess around with adding/deleting modules in different locations and make sure the slot is full when it really is full! The case in particular that was erroring was if a TC is attached and trying to add a module to slot 1, the util thought slot 1 was full even though slots 7,8,10,11 were full

Then test with creating a flex protocol and do the same thing.

Changelog

  • change logic to === instead of includes()

Review requests

see test plan

Risk assessment

low

@jerader jerader requested a review from a team December 13, 2023 17:12
Comment on lines -164 to -168
...values(initialDeckSetup.modules).filter((moduleOnDeck: ModuleOnDeck) =>
slot.includes(moduleOnDeck.slot)
...values(initialDeckSetup.modules).filter(
(moduleOnDeck: ModuleOnDeck) => moduleOnDeck.slot === slot
),
...values(initialDeckSetup.labware).filter((labware: LabwareOnDeckType) =>
slot.includes(labware.slot)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this old logic only works for a Flex since the slot numberings are a grid system. the new logic takes into account the Ot-2 slots.

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the sandbox worked as expected.

@jerader jerader merged commit d15b22e into edge Dec 14, 2023
20 checks passed
@jerader jerader deleted the pd_fix-more-is-slot-empty-logic branch December 14, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants