Moved plugin mounting to a Microscope method
This commit is contained in:
parent
8e953e1064
commit
7a58b4e95e
3 changed files with 23 additions and 13 deletions
|
|
@ -2,7 +2,7 @@
|
|||
from openflexure_microscope.camera.pi import StreamingCamera
|
||||
from openflexure_stage import OpenFlexureStage
|
||||
from openflexure_microscope import Microscope
|
||||
from openflexure_microscope.plugins import PluginMount, load_plugin, search_plugin_dirs
|
||||
from openflexure_microscope.plugins import PluginMount, load_plugin, search_plugin_paths
|
||||
|
||||
import atexit
|
||||
import logging, sys
|
||||
|
|
@ -11,11 +11,7 @@ logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
|
|||
if __name__ == '__main__':
|
||||
microscope = Microscope(StreamingCamera(), OpenFlexureStage("/dev/ttyUSB0"))
|
||||
|
||||
plugins_list = search_plugin_dirs([], include_default=True)
|
||||
|
||||
for i in plugins_list:
|
||||
module = load_plugin(i)
|
||||
microscope.plugin.attach(module)
|
||||
microscope.find_plugins() # Automatically find microscope plugins
|
||||
|
||||
# Check that default tets plugins have loaded
|
||||
print("RUNNING PLUGIN METHODS:")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue