harp-tech / device.behavior

A multi-purpose device tailored to behavioral experiments. It allows control of pokes, RGB LEDs, LEDs, cameras, servo motors and a quadrature counter.
1 stars 0 forks source link

Consider adding DigitalOutputState event to track pulse mode falling edges #17

Open bruno-f-cruz opened 7 months ago

bruno-f-cruz commented 7 months ago

If an output is set to pulse mode, the onset of the pulse can be timestamped using the write of the OutputSet register. However, there is currently no way to recover the precise event of when the falling edge occurred. It might be interesting to find a way to report this information. I propose co-opting the existing DigitalOutputState and additionally make it an event that behaves identically to DigitalInputState (ie emits a message on any pin change). This event might be omitted on writes to the same register.