Skip to content

Commit

Permalink
fix(protocol-designer): add missing prop to getPipetteCapacity usage (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader authored Jun 6, 2024
1 parent f531fb3 commit 13b3c6d
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,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 @@ -280,7 +281,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 @@ -649,7 +651,12 @@ export function dependentFieldsUpdateMoveLiquid(
chainPatch =>
updatePatchDisposalVolumeFields(chainPatch, rawForm, pipetteEntities),
chainPatch =>
clampAspirateAirGapVolume(chainPatch, rawForm, pipetteEntities),
clampAspirateAirGapVolume(
chainPatch,
rawForm,
pipetteEntities,
labwareEntities
),
chainPatch =>
clampDisposalVolume(
chainPatch,
Expand Down

0 comments on commit 13b3c6d

Please sign in to comment.