Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors the DAQ control and recovery system to improve error handling, GUI-server synchronization, and code maintainability. The changes introduce specialized recovery procedures for floco operations, a new checkbox toggle pattern for GUI controls, enhanced status monitoring with real-time updates, and improved logging with color-coded output.
- Enhanced recovery procedures with detailed logging, additional validation checks, and specialized floco-specific robot recovery functions
- Refactored GUI checkbox callbacks to use a centralized toggle handler that communicates with the server instead of directly modifying configuration
- Implemented server-to-GUI broadcast system for synchronizing robot, mount, beam check, and queue collect states via JSON messages
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| robot_lib.py | Adds wrapper functions for specialized floco recovery and gripper drying operations |
| gui/dialog/staff_screen.py | Refactors checkbox callbacks to use generic toggle handler and server communication pattern |
| gui/control_main.py | Implements server command processing, adds status widgets for queue collect and dewar plate position, and connects new signals for state changes |
| embl_robot.py | Introduces specialized recovery methods that raise exceptions on fatal errors for improved error propagation |
| daq_main_common.py | Expands the server function whitelist to include new toggle functions for various system states |
| daq_macros.py | Enhances recovery procedure with color-coded logging, additional validation checks, and GUI broadcast messages for state synchronization |
| daq_lib.py | Renames functions to snake_case convention (floco_stop_operations, floco_continue_operations) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Comments suppressed due to low confidence (2)
gui/dialog/staff_screen.py:297
- This callback now receives a boolean value (True/False) from the clicked signal, not QtCore.Qt.Checked/Unchecked enum values. The condition should be changed to
if state:andelse:to match the boolean input, similar to the enableMountCheckCB implementation.
def set_energy_check_cb(self, state):
if state == QtCore.Qt.Checked:
setBlConfig(SET_ENERGY_CHECK, 1)
logger.debug(f"{SET_ENERGY_CHECK} on")
else:
setBlConfig(SET_ENERGY_CHECK, 0)
logger.debug(f"{SET_ENERGY_CHECK} off")
gui/dialog/staff_screen.py:310
- This callback now receives a boolean value (True/False) from the clicked signal, not QtCore.Qt.Checked/Unchecked enum values. The condition should be changed to
if state:andelse:to match the boolean input.
def topViewOnCheckCB(self, state):
if state == QtCore.Qt.Checked:
setBlConfig(TOP_VIEW_CHECK, 1)
else:
setBlConfig(TOP_VIEW_CHECK, 0)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The main changes include a major refactor and expansion of the recovery logic, new GUI signals and callbacks for real-time updates, and improved communication of system state changes to the client. Below are the most important changes grouped by theme:
Recovery Procedure Enhancements:
run_recovery_procedureindaq_macros.pyto include more granular steps, improved error handling, and detailed logging with color-coded terminal output. Added new checks (e.g., gonio status), and separated stop/continue operation logic with more descriptive steps. Also, introduced new robot and gripper recovery methods inembl_robot.pyfor the floco workflow. [1] [2] [3] [4]flocoStopOperationsandflocoContinueOperationstofloco_stop_operationsandfloco_continue_operationsindaq_lib.py.Backend–Frontend Synchronization & Communication:
daq_macros.py) to frontend GUI for key state changes (e.g., robot online, mount enabled), and extendedpopupServerMessageingui/control_main.pyto parse and react to these commands, updating GUI checkboxes and widgets accordingly. [1] [2] [3]GUI Real-Time Feedback and Usability Improvements:
gui/control_main.pyto react to governor state and dewar plate position changes, updating the camera view and status bar widgets in real time. Status bar styling and initialization were improved for clarity. [1] [2] [3] [4].clickedinstead of.stateChangedfor more reliable interaction, and improved their initialization logic.Camera and Video Improvements:
Minor Fixes and Refactoring: