Skip to content

Commit

Permalink
syntax fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 8, 2024
1 parent 2aa36f0 commit cc12554
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,6 @@ async def liquid_probe(
except PipetteLiquidNotFoundError as lnfe:
error = lnfe
pos = await self.gantry_position(checked_mount, refresh=True)
print(f"loop ctl {probe_start_pos.z} {pos.z} {max_z_dist}")
await self.move_to(checked_mount, probe_start_pos)
if error is not None:
# if we never found liquid raise an error
Expand Down
8 changes: 2 additions & 6 deletions api/tests/opentrons/hardware_control/test_ot3_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ async def test_liquid_not_found(
await ot3_hardware.move_to(OT3Mount.LEFT, Point(10, 10, 10))

async def _fake_pos_update_and_raise(
self,
self: OT3Simulator,
mount: OT3Mount,
max_p_distance: float,
mount_speed: float,
Expand All @@ -963,17 +963,13 @@ async def _fake_pos_update_and_raise(
force_both_sensors: bool = False,
) -> float:
pos = self._position
print(
f"{pos[Axis.by_mount(mount)]} - {mount_speed * (abs(max_p_distance/plunger_speed)-0.2)} = "
)
pos[Axis.by_mount(mount)] += mount_speed * (
abs(max_p_distance / plunger_speed) - 0.2
)
print(pos[Axis.by_mount(mount)])
await self.update_position()
raise PipetteLiquidNotFoundError()

hardware_backend.liquid_probe = types.MethodType(
hardware_backend.liquid_probe = types.MethodType( # type: ignore[method-assign]
_fake_pos_update_and_raise, hardware_backend
)

Expand Down

0 comments on commit cc12554

Please sign in to comment.