Skip to content

Commit

Permalink
disable liquid presence detection
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Nov 20, 2024
1 parent ae611ba commit 7b39cf6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/opentrons/hardware_control/backends/flex_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def set_pressure_sensor_available(
) -> None:
...

def get_pressure_sensor_available(self, pipette_axis: Axis) -> bool:
...

def update_constraints_for_gantry_load(self, gantry_load: GantryLoad) -> None:
...

Expand Down
4 changes: 4 additions & 0 deletions api/src/opentrons/hardware_control/backends/ot3controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ def set_pressure_sensor_available(
pip_node = axis_to_node(pipette_axis)
self._pressure_sensor_available[pip_node] = available

def get_pressure_sensor_available(self, pipette_axis: Axis) -> bool:
pip_node = axis_to_node(pipette_axis)
return self._pressure_sensor_available[pip_node]

def update_constraints_for_calibration_with_gantry_load(
self,
gantry_load: GantryLoad,
Expand Down
4 changes: 4 additions & 0 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,10 @@ async def cache_pipette(
# when applicable
return skipped

def get_pressure_sensor_available(self, mount: OT3Mount) -> bool:
pip_axis = Axis.of_main_tool_actuator(mount)
return self._backend.get_pressure_sensor_available(pip_axis)

def _set_pressure_sensor_available(
self,
mount: OT3Mount,
Expand Down
5 changes: 5 additions & 0 deletions api/src/opentrons/protocol_api/core/engine/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,11 @@ def retract(self) -> None:
self._engine_client.execute_command(cmd.HomeParams(axes=[z_axis]))

def detect_liquid_presence(self, well_core: WellCore, loc: Location) -> bool:
if not self._sync_hardware_api.pressure_sensor_available(
mount=self.get_mount()
):
raise ValueError("Liquid Presence Detection not available.")

labware_id = well_core.labware_id
well_name = well_core.get_name()
well_location = WellLocation(
Expand Down

0 comments on commit 7b39cf6

Please sign in to comment.