Skip to content

wait

cmd_wait(ids, ctx, timeout=5.0) #

Wait for one or more servos to stop moving (reached target or blocked).

Source code in cogip/tools/scservo_async/wait.py
30
31
32
33
34
35
36
37
38
def cmd_wait(
    ids: Annotated[list[int], typer.Argument(help="List of Servo IDs to wait for")],
    ctx: typer.Context,
    timeout: Annotated[float, typer.Option("-t", "--timeout", help="Timeout in seconds")] = 5.0,
):
    """
    Wait for one or more servos to stop moving (reached target or blocked).
    """
    asyncio.run(wait(ctx, ids, timeout))