|
36 | 36 | UnsupportedAPIError,
|
37 | 37 | )
|
38 | 38 |
|
39 |
| - |
40 | 39 | # TODO(mc, 2022-09-02): re-exports provided for backwards compatibility
|
41 | 40 | # remove when their usage is no longer needed
|
42 | 41 | from opentrons.protocols.labware import ( # noqa: F401
|
|
49 | 48 | from ._liquid import Liquid
|
50 | 49 | from ._types import OffDeckType
|
51 | 50 | from .core import well_grid
|
52 |
| -from .core.engine import ENGINE_CORE_API_VERSION, SET_OFFSET_RESTORED_API_VERSION |
| 51 | +from .core.engine import ( |
| 52 | + ENGINE_CORE_API_VERSION, |
| 53 | + SET_OFFSET_RESTORED_API_VERSION, |
| 54 | +) |
53 | 55 | from .core.labware import AbstractLabware
|
54 | 56 | from .core.module import AbstractModuleCore
|
55 | 57 | from .core.core_map import LoadedCoreMap
|
@@ -301,6 +303,32 @@ def load_liquid(self, liquid: Liquid, volume: float) -> None:
|
301 | 303 | volume=volume,
|
302 | 304 | )
|
303 | 305 |
|
| 306 | + @requires_version(2, 21) |
| 307 | + def current_liquid_height(self) -> float: |
| 308 | + """Get the current liquid height in a well.""" |
| 309 | + return self._core.current_liquid_height() |
| 310 | + |
| 311 | + @requires_version(2, 21) |
| 312 | + def current_liquid_volume(self) -> float: |
| 313 | + """Get the current liquid volume in a well.""" |
| 314 | + return self._core.get_liquid_volume() |
| 315 | + |
| 316 | + @requires_version(2, 21) |
| 317 | + def estimate_liquid_height_after_pipetting(self, operation_volume: float) -> float: |
| 318 | + """Check the height of the liquid within a well. |
| 319 | +
|
| 320 | + :returns: The height, in mm, of the liquid from the deck. |
| 321 | +
|
| 322 | + :meta private: |
| 323 | +
|
| 324 | + This is intended for Opentrons internal use only and is not a guaranteed API. |
| 325 | + """ |
| 326 | + |
| 327 | + projected_final_height = self._core.estimate_liquid_height_after_pipetting( |
| 328 | + operation_volume=operation_volume, |
| 329 | + ) |
| 330 | + return projected_final_height |
| 331 | + |
304 | 332 | def _from_center_cartesian(self, x: float, y: float, z: float) -> Point:
|
305 | 333 | """
|
306 | 334 | Private version of from_center_cartesian. Present only for backward
|
|
0 commit comments