Skip to content

Commit

Permalink
slave master controller
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Sep 29, 2024
1 parent b2b7b6e commit 206721c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ def ini_detector(self, controller=None):
"""

raise NotImplemented # TODO when writing your own plugin remove this line and modify the one below
self.ini_detector_init(old_controller=controller,
new_controller=PythonWrapperOfYourInstrument())
self.ini_detector_init(slave_controller=controller)

if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
self.controller.open_communication() # call eventual methods

# TODO for your custom plugin (optional) initialize viewers panel with the future type of data
self.dte_signal_temp.emit(DataToExport(name='myplugin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ def ini_detector(self, controller=None):
"""

raise NotImplemented # TODO when writing your own plugin remove this line and modify the one below
self.ini_detector_init(old_controller=controller,
new_controller=PythonWrapperOfYourInstrument())
self.ini_detector_init(slave_controller=controller)

if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
self.controller.open_communication() # call eventual methods

## TODO for your custom plugin
# get the x_axis (you may want to to this also in the commit settings if x_axis may have changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ def ini_detector(self, controller=None):
False if initialization failed otherwise True
"""
raise NotImplemented # TODO when writing your own plugin remove this line and modify the one below
self.ini_detector_init(old_controller=controller,
new_controller=PythonWrapperOfYourInstrument())
self.ini_detector_init(slave_controller=controller)

if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
self.controller.open_communication() # call eventual methods

## TODO for your custom plugin
# get the x_axis (you may want to to this also in the commit settings if x_axis may have changed
Expand Down

0 comments on commit 206721c

Please sign in to comment.