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

ContextTask.Reset() should call oni.Context.Refresh() instead of deleting and reopening context #407

Open
aacuevas opened this issue Feb 6, 2025 · 0 comments
Assignees

Comments

@aacuevas
Copy link
Collaborator

aacuevas commented Feb 6, 2025

Due to how the initializing process, we are resetting the context multiple times to refresh the device table when conditions change (e.g.: after powering a headstage or setting passthrough mode).

At the moment ContextTask.Reset() disposes the entire oni.Context and creates a new one. This seem inefficient. The reset should instead call oni.Context.Refresh(), which issues the soft-reset command and repopulates the device table without closing the context or hardware connection itself.

This is required if we add a hardware safety that truly resets the hardware to POR conditions after the connection is closed, as suggested on #406 .

@glopesdev can you think, top of your head, of any possible downside that I might not be seeing?

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

No branches or pull requests

2 participants