Skip to content

Commit b992d0a

Browse files
fix(api): use same well offset between liquid measuring functions (#18323)
1 parent 9d7aa9f commit b992d0a

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

analyses-snapshot-testing/tests/__snapshots__/analyses_snapshot_test/test_analysis_snapshot[d2c818bf00][Flex_S_v2_20_P50_LPD].json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4739,7 +4739,7 @@
47394739
"offset": {
47404740
"x": 0.0,
47414741
"y": 0.0,
4742-
"z": 0.0
4742+
"z": 2.0
47434743
},
47444744
"origin": "top",
47454745
"volumeOffset": 0.0
@@ -4750,7 +4750,7 @@
47504750
"position": {
47514751
"x": 391.88,
47524752
"y": 42.74,
4753-
"z": 44.4
4753+
"z": 46.4
47544754
},
47554755
"z_position": "SimulatedProbeResult"
47564756
},
@@ -5031,7 +5031,7 @@
50315031
"offset": {
50325032
"x": 0.0,
50335033
"y": 0.0,
5034-
"z": 0.0
5034+
"z": 2.0
50355035
},
50365036
"origin": "top",
50375037
"volumeOffset": 0.0
@@ -5042,7 +5042,7 @@
50425042
"position": {
50435043
"x": 391.88,
50445044
"y": 42.74,
5045-
"z": 44.4
5045+
"z": 46.4
50465046
},
50475047
"z_position": "SimulatedProbeResult"
50485048
},
@@ -5063,7 +5063,7 @@
50635063
"offset": {
50645064
"x": 0.0,
50655065
"y": 0.0,
5066-
"z": 0.0
5066+
"z": 2.0
50675067
},
50685068
"origin": "top",
50695069
"volumeOffset": 0.0
@@ -5074,7 +5074,7 @@
50745074
"position": {
50755075
"x": 391.88,
50765076
"y": 42.74,
5077-
"z": 44.4
5077+
"z": 46.4
50785078
},
50795079
"z_position": "SimulatedProbeResult"
50805080
},

api/src/opentrons/protocol_api/core/engine/instrument.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,8 +2294,9 @@ def _pressure_supported_by_pipette(self) -> bool:
22942294
def detect_liquid_presence(self, well_core: WellCore, loc: Location) -> bool:
22952295
labware_id = well_core.labware_id
22962296
well_name = well_core.get_name()
2297+
offset = LIQUID_PROBE_START_OFFSET_FROM_WELL_TOP
22972298
well_location = WellLocation(
2298-
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=0)
2299+
origin=WellOrigin.TOP, offset=WellOffset(x=offset.x, y=offset.y, z=offset.z)
22992300
)
23002301

23012302
# The error handling here is a bit nuanced and also a bit broken:
@@ -2375,14 +2376,14 @@ def liquid_probe_with_recovery(self, well_core: WellCore, loc: Location) -> None
23752376

23762377
self._protocol_core.set_last_location(location=loc, mount=self.get_mount())
23772378

2378-
# TODO(cm, 3.4.25): decide whether to allow users to try and do math on a potential SimulatedProbeResult
23792379
def liquid_probe_without_recovery(
23802380
self, well_core: WellCore, loc: Location
23812381
) -> LiquidTrackingType:
23822382
labware_id = well_core.labware_id
23832383
well_name = well_core.get_name()
2384+
offset = LIQUID_PROBE_START_OFFSET_FROM_WELL_TOP
23842385
well_location = WellLocation(
2385-
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=2)
2386+
origin=WellOrigin.TOP, offset=WellOffset(x=offset.x, y=offset.y, z=offset.z)
23862387
)
23872388
pipette_movement_conflict.check_safe_for_pipette_movement(
23882389
engine_state=self._engine_client.state,

api/tests/opentrons/protocol_api/core/engine/test_instrument_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ def test_detect_liquid_presence(
18861886
cmd.TryLiquidProbeParams(
18871887
pipetteId=subject.pipette_id,
18881888
wellLocation=WellLocation(
1889-
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=0)
1889+
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=2)
18901890
),
18911891
wellName=well_core.get_name(),
18921892
labwareId=well_core.labware_id,

0 commit comments

Comments
 (0)