Skip to content

Commit

Permalink
raise a hardware error instead of an assert
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed May 23, 2024
1 parent 9a45d82 commit 7a05d17
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api/src/opentrons/hardware_control/backends/ot3controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
LiquidNotFoundError,
CommunicationError,
PythonException,
UnsupportedHardwareCommand,
)

from .subsystem_manager import SubsystemManager
Expand Down Expand Up @@ -1367,12 +1368,16 @@ async def liquid_probe(
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY,
) -> float:
if output_option == OutputOptions.sync_buffer_to_csv:
assert (
if (
self._subsystem_manager.device_info[
SubSystem.of_mount(mount)
].revision.tertiary
== "1"
)
):
raise UnsupportedHardwareCommand(
"Liquid Probe not supported on this pipette firmware"
)

head_node = axis_to_node(Axis.by_mount(mount))
tool = sensor_node_for_pipette(OT3Mount(mount.value))
csv_output = bool(output_option.value & OutputOptions.stream_to_csv.value)
Expand Down

0 comments on commit 7a05d17

Please sign in to comment.