fix(omny): sample-storage widget shows the shuttle places as on the real shuttle (3 rows x 2: 1 2 / 3 4 / 5 6), also in the PDF report
CI for csaxs_bec / test (push) Successful in 3m18s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M8zoDvfTY6VYunNtWse9VZ
This commit is contained in:
Mirko HollerandClaude Opus 5.5 committed 2026-10-27 20:54:16 +01:00
1 parent bd2448b746
commit 495609dbd0
1 file changed
+8 -5
@@ -130,6 +130,8 @@ EMPTY_LABEL = "— empty —" # what an empty cell shows in the GUI
# OMNY-specific layout
OMNY_SHUTTLE_LETTERS = ("A", "B", "C")
OMNY_SHUTTLE_SLOTS = tuple(range(1, 7))
# places as on the real shuttle: 3 rows x 2 columns, 1 2 / 3 4 / 5 6 (Mirko 2026-10-27; was 2 x 3)
OMNY_SHUTTLE_COLS = 2
OMNY_FIXED_POSITIONS = (10, 11, 12, 13, 14, 32, 33, 34, 100, 101)
OMNY_PARKING_SLOTS = tuple(range(1, 7))
# OMNYSampleStorage.unset_shuttle_slot()'s own empty sentinel -- unlike sample
@@ -446,7 +448,8 @@ class OMNY_SampleStorage(BECWidget, QWidget):
- Header: Stage and Gripper, right-click correctable
- Grid: the 10 fixed O positions, right-click correctable
- Three shuttle sections (A/B/C): installed/active status line
(right-click to assign/clear a parking slot) + a 6-slot grid,
(right-click to assign/clear a parking slot) + a 6-slot grid as on the
real shuttle (3 rows x 2 columns: 1 2 / 3 4 / 5 6),
right-click correctable
- Caveat line: records only, not hardware
@@ -999,7 +1002,7 @@ class OMNY_SampleStorage(BECWidget, QWidget):
slot_grid = QGridLayout()
slot_grid.setSpacing(4)
for idx, n in enumerate(OMNY_SHUTTLE_SLOTS):
r, c = divmod(idx, 3)
r, c = divmod(idx, OMNY_SHUTTLE_COLS)
key = ("shuttle", letter, n)
cell = _SlotCell(key, self, COLOR_SLOT_BORDER, caption=f"{letter}-{n}")
self._cells[key] = cell
@@ -1403,7 +1406,7 @@ class OMNY_SampleStorage(BECWidget, QWidget):
usable_w = pdf.w - 2 * margin
cell_h = 28
# shuttles A/B/C: status line + 3-wide slot grid, side by side
# shuttles A/B/C: status line + slot grid as on the shuttle (3 rows x 2), side by side
shuttle_y0 = pdf.get_y()
shuttle_w = usable_w / 3
for si, letter in enumerate(OMNY_SHUTTLE_LETTERS):
@@ -1419,9 +1422,9 @@ class OMNY_SampleStorage(BECWidget, QWidget):
pdf.set_font("Helvetica", "B", 9)
pdf.cell(shuttle_w, 5, status_text, align="L")
slot_w = shuttle_w / 3
slot_w = shuttle_w / OMNY_SHUTTLE_COLS
for idx, n in enumerate(OMNY_SHUTTLE_SLOTS):
r, c = divmod(idx, 3)
r, c = divmod(idx, OMNY_SHUTTLE_COLS)
x = x0 + c * slot_w
y = shuttle_y0 + 6 + r * cell_h
key = ("shuttle", letter, n)