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

Undocumented event from `StopCameras` register #18

Closed bruno-f-cruz closed 1 week ago

bruno-f-cruz commented 5 months ago

When analyzing some of the data from an experiment, we identified a EVENT type message from register StopCameras. This raises a few concerns:

  1. Is this a firmware bug? Doesn't appear to be since the logic is described in the firmware: https://github.com/harp-tech/device.behavior/blob/e1a2c1eb4679318b77571f3f41ac94ce4ae89d9e/Firmware/Behavior/interrupts.c#L217-L230
  2. What is the function of this interrupt routine? Is it to distinguish between instruction to stop and an async promise return when the stop was actually executed?
  3. We should document the functionality of this EVENT and add it to the device.yml https://github.com/harp-tech/device.behavior/blob/e1a2c1eb4679318b77571f3f41ac94ce4ae89d9e/device.yml#L174-L177
filcarv commented 5 months ago

The event happens when the camera was actually stopped. Between the stop instruction and the real stop, in some cases, there's an extra trigger. This way, the event will tell that the camera is really stoped and no triggers should expected.