Skip to content

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

Closed
@aacuevas

Description

@aacuevas

During the initialization 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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions