Skip to content

Commit

Permalink
remove magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Dec 13, 2024
1 parent 0713563 commit 5fd016f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ async def liquid_probe(
threshold_pascals: float,
plunger_impulse_time: float,
num_baseline_reads: int,
z_offset_for_plunger_prep: float,
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY,
force_both_sensors: bool = False,
response_queue: Optional[PipetteSensorResponseQueue] = None,
Expand Down
2 changes: 2 additions & 0 deletions api/src/opentrons/hardware_control/backends/ot3controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,7 @@ async def liquid_probe(
threshold_pascals: float,
plunger_impulse_time: float,
num_baseline_reads: int,
z_offset_for_plunger_prep: float,
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY,
force_both_sensors: bool = False,
response_queue: Optional[PipetteSensorResponseQueue] = None,
Expand Down Expand Up @@ -1535,6 +1536,7 @@ def response_capture(data: Dict[SensorId, List[SensorDataType]]) -> None:
threshold_pascals=threshold_pascals,
plunger_impulse_time=plunger_impulse_time,
num_baseline_reads=num_baseline_reads,
z_offset_for_plunger_prep=z_offset_for_plunger_prep,
sensor_id=sensor_id_for_instrument(probe),
force_both_sensors=force_both_sensors,
emplace_data=response_capture,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ async def liquid_probe(
threshold_pascals: float,
plunger_impulse_time: float,
num_baseline_reads: int,
z_offset_for_plunger_prep: float,
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY,
force_both_sensors: bool = False,
response_queue: Optional[PipetteSensorResponseQueue] = None,
Expand Down
2 changes: 2 additions & 0 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,7 @@ async def _liquid_probe_pass(
probe_settings: LiquidProbeSettings,
probe: InstrumentProbeType,
p_travel: float,
z_retract_settings: Tuple[float, float, float],
force_both_sensors: bool = False,
response_queue: Optional[PipetteSensorResponseQueue] = None,
) -> float:
Expand Down Expand Up @@ -2838,6 +2839,7 @@ async def prep_plunger_for_probe_move(
probe_settings,
checked_probe,
plunger_travel_mm + sensor_baseline_plunger_move_mm,
z_offset_for_plunger_prep,
force_both_sensors,
response_queue,
)
Expand Down
4 changes: 3 additions & 1 deletion hardware/opentrons_hardware/hardware_control/tool_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ async def liquid_probe(
threshold_pascals: float,
plunger_impulse_time: float,
num_baseline_reads: int,
z_offset_for_plunger_prep: float,
sensor_id: SensorId = SensorId.S0,
force_both_sensors: bool = False,
emplace_data: Optional[
Expand Down Expand Up @@ -331,8 +332,9 @@ async def liquid_probe(
)
sensor_runner = MoveGroupRunner(move_groups=[[lower_plunger], [sensor_group]])

# Only raise the z a little so we don't do a huge slow travel
raise_z = create_step(
distance={head_node: float64(max_z_distance)},
distance={head_node: float64(z_offset_for_plunger_prep)},
velocity={head_node: float64(-1 * mount_speed)},
acceleration={},
duration=float64(max_z_distance / mount_speed),
Expand Down

0 comments on commit 5fd016f

Please sign in to comment.