psychos.triggers.DelayTrigger#
- class psychos.triggers.DelayTrigger(port: BasePort, mapping: dict | None = None, delay: float = 0.01)[source]#
Bases:
BaseTriggerTrigger that sends a value, waits for a specified delay, then resets the port.
This trigger sends a value through the communication port, waits for a predefined delay to ensure that the value is registered, and then resets the port to a default state.
- __init__(port: BasePort, mapping: dict | None = None, delay: float = 0.01)[source]#
Initialize a DelayTrigger instance.
Methods
__init__(port[, mapping, delay])Initialize a DelayTrigger instance.
close()Close the trigger by closing the associated communication port.
resolve_value(value)Resolve the trigger value using the provided mapping.
send(value)Send a trigger value, wait for a specified delay, and then reset the port.