Skip to content

Commit

Permalink
put a limit on the number of multi-passes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed May 8, 2024
1 parent 48aa388 commit 2b9a476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hardware-testing/hardware_testing/liquid_sense/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class RunArgs:
dial_indicator: Optional[mitutoyo_digimatic_indicator.Mitutoyo_Digimatic_Indicator]
plunger_speed: float
trials_before_jog: int
multi_passes: int

@classmethod
def _get_protocol_context(cls, args: argparse.Namespace) -> ProtocolContext:
Expand Down Expand Up @@ -236,6 +237,7 @@ def build_run_args(cls, args: argparse.Namespace) -> "RunArgs":
dial_indicator=dial,
plunger_speed=args.plunger_speed,
trials_before_jog=args.trials_before_jog,
multi_passes=args.multi_passes,
)


Expand Down Expand Up @@ -266,6 +268,7 @@ def build_run_args(cls, args: argparse.Namespace) -> "RunArgs":
parser.add_argument("--ignore-env", action="store_true")
parser.add_argument("--ignore-dial", action="store_true")
parser.add_argument("--trials-before-jog", type=int, default=10)
parser.add_argument("--multi-passes", type=int, default=1)

args = parser.parse_args()
run_args = RunArgs.build_run_args(args)
Expand Down
2 changes: 1 addition & 1 deletion hardware-testing/hardware_testing/liquid_sense/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def _run_trial(run_args: RunArgs, tip: int, well: Well, trial: int) -> float:
)

z_distances: List[float] = find_max_z_distances(run_args, tip, well, plunger_speed)

z_distances = z_distances[: run_args.multi_passes]
start_height = well.top().point.z + run_args.start_height_offset
for z_dist in z_distances:
lps = LiquidProbeSettings(
Expand Down

0 comments on commit 2b9a476

Please sign in to comment.