added motion trajectory simulation

This commit is contained in:
ykcheungab
2026-09-23 09:58:00 +08:00
parent f1bec62ca4
commit 3347d17a20
25 changed files with 5198 additions and 1762 deletions
+10 -3
View File
@@ -95,7 +95,7 @@ apps/autocal/
motion/ # Qt-free except poller.py (the Qt worker bridge)
models.py errors.py units.py service.py transport.py poller.py
ui/ # window.py + one module per panel
tools/ # panel_check.py, panel_snapshot.py
tools/ # panel_check.py, panel_snapshot.py, preview_snapshot.py, layout_mockup.py
tests/
```
@@ -109,20 +109,27 @@ between threads. The UI talks to it through signals only.
Both work with no display, no controller and no DLL:
```powershell
python .\apps\autocal\tools\panel_check.py # 120 layout/theme/locale/gating checks
python .\apps\autocal\tools\panel_check.py # 170 layout/theme/locale/gating checks
python .\apps\autocal\tools\panel_snapshot.py --demo --theme dark --out shot.png
python .\apps\autocal\tools\panel_snapshot.py --compare --out tabs.png # one image per tab
python .\apps\autocal\tools\layout_mockup.py --out layout.png # proposed layout, drawn
python -m pytest apps\autocal\tests # offscreen suite
```
`preview_snapshot.py` is the one tool that can photograph the **3D pane**, which
`panel_snapshot.py` cannot: the offscreen platform has no OpenGL context at all, so
the pane is empty in those shots. It needs the real platform plugin and a visible
window, and it writes either the pane alone or the whole page with the pane
composited in. What the view draws, and what each colour means, is in
[docs/finger-preview.md](docs/finger-preview.md).
`layout_mockup.py` is a **wireframe, not the application**: it paints the
proposed single-page layout with the shared theme tokens and imports nothing
from the app, so the layout can be reviewed and marked up without building the
panels. It draws the full page plus previews of the other workspace tabs in one
canvas.
`panel_check.py` builds the real window in both themes at 1280×720, 1600×900 and
`panel_check.py` builds the real window in both themes at 1440×900 and
1920×1080, asserts that no widget escapes its parent, that motion is
unreachable before the bus is initialised, that the SDO/RTEX panels follow the
reported bus family, and then runs a full simulated session from `ECAT.bas`.