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): add missing prop to getPipetteCapacity usage #15422

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ const getClearedDisposalVolumeFields = (): FormPatch =>
const clampAspirateAirGapVolume = (
patch: FormPatch,
rawForm: FormData,
pipetteEntities: PipetteEntities
pipetteEntities: PipetteEntities,
labwareEntities: LabwareEntities
): FormPatch => {
const patchedAspirateAirgapVolume =
patch.aspirate_airGap_volume ?? rawForm?.aspirate_airGap_volume
Expand All @@ -283,7 +284,8 @@ const clampAspirateAirGapVolume = (
const minAirGapVolume = 0 // NOTE: a form level warning will occur if the air gap volume is below the pipette min volume

const maxAirGapVolume =
getPipetteCapacity(pipetteEntity, tipRack) - minPipetteVolume
getPipetteCapacity(pipetteEntity, labwareEntities, tipRack) -
minPipetteVolume
const clampedAirGapVolume = clamp(
Number(patchedAspirateAirgapVolume),
minAirGapVolume,
Expand Down Expand Up @@ -652,7 +654,12 @@ export function dependentFieldsUpdateMoveLiquid(
chainPatch =>
updatePatchDisposalVolumeFields(chainPatch, rawForm, pipetteEntities),
chainPatch =>
clampAspirateAirGapVolume(chainPatch, rawForm, pipetteEntities),
clampAspirateAirGapVolume(
chainPatch,
rawForm,
pipetteEntities,
labwareEntities
),
chainPatch =>
clampDisposalVolume(
chainPatch,
Expand Down
Loading