step.wait_for_dsl¶
Auto-generated step builders and DSL functions — DO NOT EDIT.
Source: wait_for.py
Classes¶
Builder for WaitFor. Auto-generated — do not edit. |
Functions¶
|
Block until a stop condition is satisfied. |
Module Contents¶
- class step.wait_for_dsl.WaitForBuilder¶
Bases:
raccoon.step.step_builder.StepBuilderBuilder for WaitFor. Auto-generated — do not edit.
- condition(value: raccoon.step.condition.StopCondition)¶
- step.wait_for_dsl.wait_for(condition: raccoon.step.condition.StopCondition = _UNSET)¶
Block until a stop condition is satisfied.
Initializes the condition, then polls it at 50 Hz until it returns True. This lets you reuse any composable
StopCondition— sensor triggers, timers, distance thresholds, or combinations — as a standalone wait without an accompanying motion.- Parameters:
condition – A
StopConditioninstance (or composition) to wait for. Supports the same|,&, and+operators as motion.until()clauses.- Returns:
A WaitForBuilder (chainable via
.condition(),.on_anomaly(),.skip_timing()).
Example:
from raccoon.step import wait_for from raccoon.step.condition import on_black, after_seconds # Wait until the front-left IR sensor sees black wait_for(on_black(Defs.front.left)) # Wait for black OR a 5-second timeout wait_for(on_black(sensor) | after_seconds(5))