fix: combine park and dry to one action for after-queue cleanup
CI / lint (pull_request) Successful in 42s
CI / test (3.12) (pull_request) Successful in 1m0s
CI / test (3.13) (pull_request) Successful in 1m4s
CI / test (3.14) (pull_request) Successful in 1m7s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m9s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m17s
CI / test-with-coverage (pull_request) Successful in 1m34s
CI / coverage-analysis (pull_request) Failing after 3s
Docs build and publish / docker (push) Successful in 13s
CI / lint (push) Successful in 34s
CI / test (3.12) (push) Canceled after 47s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 39s
CI / test (3.13) (push) Canceled after 44s
CI / test (3.14) (push) Canceled after 42s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 37s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 34s
CI / test-with-coverage (push) Canceled after 32s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 33s

This commit was merged in pull request #223.
This commit is contained in:
perl_d committed 2026-09-14 09:34:29 +02:00
1 parent a177484e61
commit 1b5a3bd0c4
4 files changed
+28 -5

No files matched your search

+19
View File
@@ -1200,6 +1200,25 @@ async def unmount(token: str = Depends(oauth2_scheme)):
return "OK"
@app.post("/sample/unmount_then_park_and_dry")
@needs_hw_lock
async def unmount_then_park_and_dry(token: str = Depends(oauth2_scheme)):
"""
Unmount the current sample from the goniometer, then tell the robot to park and dry
Args:
token: OAuth2 access token.
Returns:
"OK" on success.
"""
logger.debug("Unmount, then park and dry")
auth.check_jwt_rw(cfg, auth.parse_token(token))
daq.sample = None
daq.park_and_dry(park=True)
return "OK"
@app.post("/sample/manual")
@needs_hw_lock
async def manual(s: SampleShortInfo, token: str = Depends(oauth2_scheme)):
+1 -1
View File
@@ -1113,7 +1113,7 @@ class MainWindow(QMainWindow):
self.job_list_panel.auto_scan.connect(self.daq.automated_scan)
self.job_list_panel.unmount.connect(self.daq.unmount)
self.job_list_panel.park_and_dry.connect(self.daq.park_and_dry)
self.job_list_panel.unmount_then_park_and_dry.connect(self.daq.unmount_then_park_and_dry)
# Gate manual mounts/unmounts on the hutch PSS state so the user gets an
# immediate pop-up instead of the robot failing to move server-side.
+4 -3
View File
@@ -31,7 +31,7 @@ logger = setup_logger(LOGGER_NAME)
class SampleQueuePanel(QFrame):
auto_scan = Signal(SampleShortInfo)
unmount = Signal()
park_and_dry = Signal()
unmount_then_park_and_dry = Signal()
viewer_track_online = Signal()
samples_in_queue_changed = Signal(int)
automation_running_changed = Signal(bool)
@@ -284,11 +284,12 @@ class SampleQueuePanel(QFrame):
self.pause_automation()
logger.info("Automation queue empty; unmounting current sample.")
self.unmount.emit()
if self.park_and_dry_when_cleared.isChecked():
logger.info("Automation queue empty; parking and drying TELL.")
self.park_and_dry.emit()
self.unmount_then_park_and_dry.emit()
else:
self.unmount.emit()
def run(self):
self._recovery_timer.stop()
+4 -1
View File
@@ -1499,7 +1499,10 @@ class DAQWorker(QObject):
def anneal(self, time_s: float):
self.generic_post(f"beamline/anneal?time_s={time_s:.1f}")
# TODO combine dry and park and dry
@Slot()
def unmount_then_park_and_dry(self):
self.generic_post("sample/unmount_then_park_and_dry")
@Slot()
def park_and_dry(self):
self.generic_post("tell/park_and_dry")