- What: 新增 apps/studio/src/orisys_studio/display_prefs.py:把「同一个测量值可以怎么 显示」搬进 DisplayPrefsController——单位(newton / raw,含工具栏、曲线图、重算引擎、 数值卡四处同步)、量程与时间窗(含默认值、应用到面板、供对话框读取)、箭头显示 (按传感器决定旋转是否可用、图例倍率、旋转 90°)、2D 视图模式切换后的重绘、以及 rail 上的帧率读数开关。控制器自己拥有 show_fps;其余偏好仍写在 preferences 里。 `DisplayHost` Protocol 写明它向窗口借的五件事:_persist_prefs / _refresh_status_rail / _latest_fps(算滤波设计用的采样率)/ _drop_render_marker + _repaint_live_frame (2D 视图模式变了要重建那一帧)。 _on_plot_settings *不搬*:它要开 QDialog、还要把滤波系数交给采集 worker,那是会话与 窗口的事,不是显示偏好;它现在只向控制器取对话框要显示的值、把结果交回去应用。 - What: 窗口侧保留过渡 shim(_set_display_unit / _on_units_changed / _on_chart_unit_toggle / _on_image_view_mode_changed / _on_show_fps_toggled / _apply_plot_prefs_to_panel / _device_sample_rate / _apply_arrow_rotation_for_sensor / _apply_arrow_legend / _draw_style / _on_rotate_arrows,以及 _show_fps 可读写属性),供 tests 与 tools/ui_check.py 继续驱动窗口(其中 window._on_plot_settings 仍可被测试整体替换)。 窗口内部连线(toolbar.units_changed、arrow_panel.view_mode_changed、 force_plots.unit_toggle_requested、act_show_fps.toggled、act_rotate_arrows.triggered) 改为直连控制器;_sync_menu_checks 里的箭头部分也走控制器。 - What: 新增 apps/studio/tests/test_display_prefs.py:11 个用例——单位四处同步、 工具栏改单位时不回写工具栏(防回声)、图表单位芯片翻转、对话框值取默认值、 应用量程写偏好与面板、采样率优先用实测值再回落存储值与默认值、不可旋转的传感器 不提供旋转且不写偏好、可旋转的重启后记住角度、图例倍率随 draw style 变化、 切换 2D 模式只重绘一次、帧率开关同时更新偏好与 rail。 - Why: 「数字怎么显示」是 app_window 的第四个独立变更驱动:改一个显示偏好不该碰会话、 回放或布局。搬完之后这条规则的唯一所有者在 display_prefs 里,且可以脱离窗口单测。 - Verification: pytest shared/tests apps/studio/tests(offscreen)632 passed / 0 failed / 15 skipped(原 621 + 新增 11);apps/studio/tools/ui_check.py 587 项检查 0 失败; .repro/locale_check.py 0 缺失。行为等价(搬运 + 一层转发)。 - Not in this change: 标定交互(_on_calibration_apply / 身份与不匹配检查 / 导出与事件) 仍未拆分;预览(_start_preview/_stop_preview/_on_preview_tick)留在窗口; _depth_range/_depth_scale_text 与 _show_image_frame 同属 2D 渲染,留在窗口; docs 的行数/方法数指标待全部切片落定后统一刷新。
orisys-app
Desktop applications that consume the Orisys SDK.
| App | Status |
|---|---|
apps/studio |
Scaffold shell (theme / locale / prefs / logging) |
apps/internal |
Stub for future calibration & automated testing |
Layout
shared/— common paths, prefs, theme, i18n, loggingapps/studio/config/— locales, default prefs, editablesensors/copiesapps/studio/outputs/— generated logs and calibration exports (gitignored)build/— Windows PyInstaller packaging (build/studio/build.ps1)
Run (studio shell)
cd D:\repo\orisys-app
python -m pip install -e .\shared -e .\apps\studio
python .\apps\studio\run.py
Or without install:
$env:PYTHONPATH = "D:\repo\orisys-app\shared\src;D:\repo\orisys-app\apps\studio\src"
python D:\repo\orisys-app\apps\studio\run.py
Local orisys SDK
orisys_app_shared.force imports orisys.calibration at module scope, so the
studio app cannot start against an SDK build that predates that module
(the published 0.5.2 wheel does not include it). When working from a repo
checkout, install the SDK from source instead of from an index:
python -m pip install .\..\orisys-sdk # same checkout that built this app
If a pip build is blocked by the environment, the equivalent manual install is
to copy orisys-sdk/src/orisys/**/*.py over site-packages/orisys/ and delete
the stale __init__.cp310-win_amd64.pyd (an extension module shadows the
package __init__.py, which hides sibling modules such as calibration.py).
Verifying UI changes
Both tools render the real main window with the offscreen Qt platform — no display, camera or sensor hardware required:
python .\apps\studio\tools\ui_check.py # layout/theme assertions
python .\apps\studio\tools\ui_snapshot.py --theme light --demo `
--sensor finger --panels cal,3d --size 1600x900 --out shot.png
ui_check.py needs only the runtime dependencies. The pytest suite in
shared/tests and apps/studio/tests covers the same ground plus locale and
preference-schema parity:
pip install pytest
python -m pytest
On Windows the offscreen platform finds no fonts unless QT_QPA_FONTDIR points
at C:\Windows\Fonts; both tools set it automatically.
ui_check.py also runs the palette rules (WCAG contrast, colour separation,
ramp monotonicity) that guard the brand tokens; see
apps/studio/docs/ui-palette.md for the
colour system, its relationship to the UI design spec, and every deliberate
deviation from it.
ui_check.py includes a record channel section as well; see
apps/studio/docs/record-channel.md for
why recording and calibration sampling no longer hang off the UI refresh timer,
and for the data-reliability fixes that came with it.
Branding
Window / EXE icon: shared/resources/branding/logo.png
Top bar / About: shared/resources/branding/logo_topbar.png
Dark mode is the default. Logos currently sit on a black tile; a transparent (or light) variant may be needed for polished light mode later.
Versioning
- Studio app version (
orisys_studio.__version__) — shown in Help → About and used for releases. - Shared package version (
orisys_app_shared.__version__) — internal library version. - Shared API (
orisys_app_shared.API_VERSION) — compatibility tag. Studio declaresREQUIRES_SHARED_API; startup logs a warning on mismatch.
Deferred
Run/Stop pipeline, arrow/force plots, units, calibration capture, Open3D finger mesh, sync-from-wheel for config/sensors, PyInstaller packaging, and the internal app.