Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Port Status during acquisition #14

Merged
merged 8 commits into from
Mar 17, 2025
Merged

Check Port Status during acquisition #14

merged 8 commits into from
Mar 17, 2025

Conversation

bparks13
Copy link
Member

@bparks13 bparks13 commented Feb 4, 2025

This PR adds the PortController as a full OnixDevice, which allows it to add and process frames during acquisition. This device is not expected to receive frames very often, or really ever, unless something happens and the lock is lost. If this occurs, an errorFlag is raised in the specific Port device, and acquisition is halted.

Before merging; please confirm that if the lock is lost the behavior stops as expected. e.g., cut power to the port during acquisition and confirm behavior. This is difficult for me to do remotely.

@bparks13 bparks13 added this to the Neuropixels 1.0f milestone Feb 4, 2025
@bparks13 bparks13 self-assigned this Feb 4, 2025
- Add PortController as an OnixDevice, implement the necessary methods
- Add PortController devices to the FrameReader so the IDs are processed
jonnew
jonnew previously requested changes Mar 7, 2025
Copy link

@jonnew jonnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During our meeting we found that since this error originates in updateBuffer(), the shutdown process may be actually being executed by the DataThread which seems to be resulting in some multithreading issues. More investigation is needed to make sure that the system shuts down properly if lock is lost during acquisition.

- Correctly parses the data frame from a Port Controller
- Run startAcquisition for the port control devices
- Modified language when unable  to acquire the communication lock
@bparks13 bparks13 requested a review from jonnew March 10, 2025 13:35
- Rename enableDevice to configureDevice
- Only update Neuropixels settings when the device is enabled
- Upon testing, the previous configuration could delete buffers before they were cleared, leading to invalid behavior. Now, the plugin reports that it cannot record so the user cannot start acquisition again without disconnecting/reconnecting the hardware
@bparks13 bparks13 requested a review from aacuevas March 17, 2025 14:57
@bparks13 bparks13 dismissed jonnew’s stale review March 17, 2025 20:27

Fixed requested changes

@bparks13 bparks13 merged commit 3c08e4a into main Mar 17, 2025
@bparks13 bparks13 deleted the issue-2 branch March 17, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check lock status during acquisition
3 participants