-
Notifications
You must be signed in to change notification settings - Fork 44
Replace first TODO instruction to import the wrapper of the instrument #33
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
Merged
seb5g
merged 3 commits into
PyMoDAQ:5.0.x
from
quantumm:feature/replace_todo_import_wrapper
Dec 17, 2025
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,9 +6,9 @@ | |
|
|
||
| from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main | ||
| from pymodaq.utils.data import DataFromPlugins | ||
| class PythonWrapperOfYourInstrument: | ||
| # TODO Replace this fake class with the import of the real python wrapper of your instrument | ||
| pass | ||
|
|
||
| # TODO Replace this fake import with the import of the real python wrapper of your instrument | ||
| from pymodaq_plugins_template.hardware.PythonWrapperFileOfYourInstrument import PythonWrapperObjectOfYourInstrument | ||
|
||
|
|
||
| # TODO: | ||
| # (1) change the name of the following class to DAQ_2DViewer_TheNameOfYourChoice | ||
|
|
@@ -47,7 +47,7 @@ class DAQ_2DViewer_Template(DAQ_Viewer_base): | |
| def ini_attributes(self): | ||
| # TODO declare the type of the wrapper (and assign it to self.controller) you're going to use for easy | ||
| # autocompletion | ||
| self.controller: PythonWrapperOfYourInstrument = None | ||
| self.controller: PythonWrapperObjectOfYourInstrument = None | ||
|
|
||
| # TODO declare here attributes you want/need to init with a default value | ||
|
|
||
|
|
@@ -84,7 +84,7 @@ def ini_detector(self, controller=None): | |
| """ | ||
| raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below | ||
| if self.is_master: | ||
| self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed | ||
| self.controller = PythonWrapperObjectOfYourInstrument() #instantiate you driver with whatever arguments are needed | ||
| self.controller.open_communication() # call eventual methods | ||
| initialized = self.controller.a_method_or_atttribute_to_check_if_init() # TODO | ||
| else: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe say the import is not exclusive from hardware but could be from another package: pymeasure, pylablib...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the file (module) write it in lowercase with underscore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.