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

Explain unloadDevice docstring #174

Open
ianhi opened this issue Mar 7, 2022 · 1 comment
Open

Explain unloadDevice docstring #174

ianhi opened this issue Mar 7, 2022 · 1 comment

Comments

@ianhi
Copy link
Contributor

ianhi commented Mar 7, 2022

https://valelab4.ucsf.edu/~MM/doc/MMCore/html/class_c_m_m_core.html#a645c4c10e8be5e705c346336dab28cd5

In particular I'm confused what "and adjusts all configuration data. " means. Came up here: https://github.com/tlambert03/pymmcore-plus/pull/109#discussion_r821041247

@marktsuchida
Copy link
Member

I think what this is supposed to mean is remove properties of the device in question from any configuration groups (or removing configuration groups entirely if they end up empty). Likewise, if the device is set to be one of the default devices (such as Core-Shutter), that setting should change when unloading the device.

Looking at the code, however, I do not see this happening (i.e., the doc comment appears to be aspirational). The truth is that unloading individual devices (as opposed to unloading all and resetting the Core) is unlikely to have ever been meaningfully tested (except when choosing devices in the Hardware Configuration Wizard, but in that case there is no configuration yet that depends on the devices).

If it is important to be able to unload individual devices cleanly (and continue to use the other devices), I can look into fixing this, though it won't be a quick fix (a quick fix is possible but would add technical debt). A proper fix will be related to notifications as discussed in #164, because we'd want e.g. config groups to listen for the unloading of devices that they involve. If that is not urgent, we should correct the doc comment to separate reality from aspirations.

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