Feature/cleaning/control module factorization#25
Open
malik-irain wants to merge 41 commits into
Open
Conversation
- Remove redundant ini_actuator_pb from DAQ_Move_UI_Base; use _setup_init_action + update_init_icon from ControlModuleUI - Fix show_graph closeEvent bug (True → False) in move UI - Rename show_tree → _show_settings in move UI for consistency - Rename _tree → _settings_widget in move UI to match viewer - Move enable_actions, _show_settings, show_settings to ControlModuleUI base so both UIs share the same implementation - Add statusbar and _settings_widget None-defaults to base __init__ - Remove redundant command_sig redeclaration from DAQ_Viewer_UI - Remove duplicate _ini_state = False assignments now covered by base Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add _hw_settings_name and _ui_init_attr class attributes to ParameterControlModule so subclasses declare their settings group name and UI init property once, removing scattered string literals. Consolidate into the base class: - quit_fun: common deinit → quit_signal → _quit_cleanup() hook → ui.close - _quit_cleanup: no-op default; DAQ_Viewer overrides to close its LCD widget - _close_hardware: emits 'close' to hardware thread, resets UI init state, disconnects LECO; replaces duplicated try/except/finally in both modules - param_deleted: identical in both modules except for _hw_settings_name - apply_controller_parameters: replace if/elif on module_type with _hw_settings_name - process_leco_commands GET_SETTINGS: replace class-name heuristic with _hw_settings_name Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… preset with only daq_move
- Add DAQ_Hardware_Base(QObject) in utils.py: shared parent for DAQ_Move_Hardware and DAQ_Detector, providing unified plugin reference, update_settings dispatch, _dispatch_custom_command helper, and queue_command handling for INI_HARDWARE and CLOSE. - Add ControlToHardware (INI_HARDWARE, CLOSE) and ThreadStatus.INI_HARDWARE / ThreadStatus.STOP as canonical unified command/status values; ThreadStatusMove.INI_STAGE, ThreadStatusViewer.INI_DETECTOR, and per-class STOP are kept as deprecated aliases. - Move ControleModuleType and ControllerStatus to thread_commands.py; re-exported from utils.py for backward compat. - DAQ_Move_Hardware now subclasses DAQ_Hardware_Base: plugin reference (replaces hardware), controller_address (replaces hardware_adress), motion_stopped (replaces motion_stoped), ini_hardware (replaces ini_stage); deprecated property aliases preserved. Adds _move_completed debounce guard on move_done to prevent double MOVE_DONE emissions. - DAQ_Detector now subclasses DAQ_Hardware_Base: plugin reference (replaces detector), ini_hardware (replaces ini_detector); deprecated property aliases preserved. queue_command delegates shared commands to super() first. - DAQ_Move and DAQ_Viewer: _ini_hw_cmd = ControlToHardware.INI_HARDWARE; thread_status handles ThreadStatus.INI_HARDWARE alongside legacy aliases; ThreadStatus.STOP handled alongside per-class STOP. - Fix timer-thread warnings: connect thread.finished → hardware.deleteLater in _setup_hardware_thread; call thread().quit() in queue_command(CLOSE) so the worker is destroyed inside its own thread. - Remove processEvents() calls from DAQ_Move_base.emit_status, axis_name/axis_names setters, and DAQ_Viewer_base.emit_status: signal delivery is already asynchronous via queued connections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename DAQ_Detector → DAQ_Viewer_Hardware for symmetry with DAQ_Move_Hardware (both are hardware workers for their respective control modules). - Remove unused _kind class attribute from DAQ_Hardware_Base and subclasses (no callers in this branch; belongs with capabilities). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…trol-module-factorization
…trol-module-factorization
…trol-module-factorization
…trol-module-factorization
…trol-module-factorization
…trol-module-factorization
…trol-module-factorization
…://github.com/Ashwolaa/PyMoDAQ into feature/cleaning/control-module-factorization
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.