feat: show AUTO CENTERING in the sample camera view while a loop centering runs
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 1m2s
CI / test (3.12) (pull_request) Failing after 1m5s
CI / test (3.13) (pull_request) Failing after 1m10s
CI / test (3.14) (pull_request) Failing after 1m19s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Failing after 1m19s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 1m20s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 1m25s
CI / test-with-coverage (pull_request) Failing after 1m25s
CI / coverage-analysis (pull_request) Skipped
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 1m2s
CI / test (3.12) (pull_request) Failing after 1m5s
CI / test (3.13) (pull_request) Failing after 1m10s
CI / test (3.14) (pull_request) Failing after 1m19s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Failing after 1m19s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 1m20s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 1m25s
CI / test-with-coverage (pull_request) Failing after 1m25s
CI / coverage-analysis (pull_request) Skipped
/status cannot tell an auto centering from a manual alignment move (both are busy + SampleAlignment, the combo the overlay deliberately hides), so the DAQ worker emits its own auto_centering flag: True while its own /alc/center_loop POST is in flight (the endpoint blocks until done) or while the automation progress reports the Center step running. The sample camera views pass it to build_busy_overlay_style, which paints a purple AUTO CENTERING wave text like the ROBOT MOUNTING/COOLING ones. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
2fdb1952b6
commit
2df433b33c
5 files changed
+78
-2
No files matched your search
@@ -2,6 +2,7 @@
|
||||
the badge pill (which reads as a button). These checks fail if the text
|
||||
renderer stops painting or the video view stops routing through it."""
|
||||
|
||||
from aarecommon.models.models import SessionsStateEnum
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QPainter, QPixmap
|
||||
|
||||
@@ -34,3 +35,18 @@ def test_video_view_paints_busy_text(qtbot):
|
||||
assert view.grab().toImage() != idle, "busy style must change the rendered view"
|
||||
view.set_busy_overlay_style(None)
|
||||
assert view.grab().toImage() == idle, "clearing the style must restore the view"
|
||||
|
||||
|
||||
def test_auto_centering_flag_overrides_alignment_gate():
|
||||
# Callers pass is_busy=False during SampleAlignment; the flag must still
|
||||
# produce the overlay, and the viewing-mode badge must still win.
|
||||
style = build_busy_overlay_style(is_busy=False, tell_state=None, auto_centering=True)
|
||||
assert style is not None and style.text == "AUTO CENTERING"
|
||||
assert build_busy_overlay_style(is_busy=False, tell_state=None) is None
|
||||
viewing = build_busy_overlay_style(
|
||||
is_busy=False,
|
||||
tell_state=None,
|
||||
session_state=SessionsStateEnum.OwnedByElse,
|
||||
auto_centering=True,
|
||||
)
|
||||
assert viewing is not None and viewing.text.startswith("Viewing mode")
|
||||
Reference in new issue
Block a user