Skip to content

fix: 修复超时门禁单测误伤 asyncio 与间隔抖动 / Fix realtime timeout test breaking as…#10

Merged
YihuiLu merged 17 commits intodevfrom
dev-latest
Apr 4, 2026
Merged

fix: 修复超时门禁单测误伤 asyncio 与间隔抖动 / Fix realtime timeout test breaking as…#10
YihuiLu merged 17 commits intodevfrom
dev-latest

Conversation

@YihuiLu
Copy link
Copy Markdown
Contributor

@YihuiLu YihuiLu commented Apr 1, 2026

…yncio

  • 不再 patch 全局 time.monotonic(会破坏 wait_for 截止时间)/ Avoid patching global monotonic used by asyncio.wait_for
  • 慢路径 sleep 长于外层下限,避免与 0.2s 超时竞态 / Use slower worker than outer min timeout
  • 第二次请求前重置 file_upload 门禁 last_finished,避免依赖墙钟间隔 / Reset gate timestamp for deterministic follow-up

Made-with: Cursor

YihuiLu added 17 commits April 1, 2026 20:16
…yncio

- 不再 patch 全局 time.monotonic(会破坏 wait_for 截止时间)/ Avoid patching global monotonic used by asyncio.wait_for
- 慢路径 sleep 长于外层下限,避免与 0.2s 超时竞态 / Use slower worker than outer min timeout
- 第二次请求前重置 file_upload 门禁 last_finished,避免依赖墙钟间隔 / Reset gate timestamp for deterministic follow-up

Made-with: Cursor
…ure to cut RAM

- native 模式按输出分辨率采集,默认关闭超采样路径大帧缓冲 / Native mode captures at output size; avoid full-sensor buffers when supersample off
- 共享帧默认不常驻 raw,分析按需同步抓帧 / Shared bus skips retaining raw by default; analysis sync-grabs when needed
- 预览接口仅 JPEG 缓存,移除 raw 再编码兜底 / Preview uses JPEG cache only; remove raw re-encode fallback
- 调试页改用 MJPEG 单连接,stream 与共享 FPS 对齐 / Debug UI uses single MJPEG; stream paced to shared preview FPS
- 调试单帧预览按客户端限流(可配间隔)/ Per-client throttle for debug single-frame preview
- 补充 systemd/OOM 与相关环境变量文档 / Add systemd/OOM and env var notes

Made-with: Cursor
- 新增 NetworkManager WiFi STA/AP 切换脚本与 API / Add nmcli WiFi switch script and REST API
- 紧急 GPIO 与 gpio_config 扩展 / Emergency GPIO hook and gpio_config extensions
- 调试系统监控静态页与模板 / Debug system monitor assets and template
- 配置、路由、schemas 与安装/镜像脚本更新 / Config, routes, schemas, install/mirror scripts
- wifi-nm 文档与 CLAUDE 说明 / wifi-nm doc and CLAUDE notes
- 分析 API 与 WiFi 单元测试 / Analysis API and WiFi unit tests

Made-with: Cursor
…eless parse fix

- 解算服务 ThreadPoolExecutor 默认 max_workers=1,降低低内存设备峰值内存 / Default solver executor to 1 worker for lower peak RAM on small boards
- 修正 /proc/net/wireless 列索引并补充单元测试 / Fix link/signal column indices and add unit test
- 调试控制台、系统调试页与解算控制台前端及构建产物更新 / Update debug pages, analysis-ui build, and static assets

Made-with: Cursor
…e deployment

- 自动同步主服务与 `ogscope-network-boot` 的 `ExecStart`,卸载时清理 unit 与 drop-in / Auto-sync ExecStart for main and ogscope-network-boot units; uninstall cleans unit and drop-in
- 安装/更新时根据环境变量复制 Tetra3 `default_database.npz` 到 `data/plate_solve/`(支持跳过/覆盖)/ Copy Tetra3 default_database.npz into data/plate_solve during install/update (skip/overwrite via env)
- 低配板降低 OOM 风险(apt 分批、可跳过 `libopencv-dev`)并补齐 WiFi 单测与调试页/网络 API / Reduce OOM risk on low-RAM boards (stagger apt, optional skip libopencv-dev), plus WiFi unit tests and debug/network API updates

Made-with: Cursor
- 新增 OGSCOPE_CAMERA_AE_POLAR_PRESET 与 OGSCOPE_CAMERA_AE_EXPOSURE_VALUE 配置
- Add env-backed camera_ae_polar_preset and camera_ae_exposure_value settings
- 自动曝光时应用 Shadows/Matrix/Long 与 EV(或 Brightness 回退)
- Apply Shadows/Matrix/Long and EV (or Brightness fallback) when AE is on

Made-with: Cursor
… during long exposure

- 通过 CameraManager.get_raw_frame 取帧并与共享预览共用读锁 / Grab frames via get_raw_frame with shared read lock
- 更新单元测试补丁以匹配新取帧路径 / Update unit test monkeypatch for new frame path

Made-with: Cursor
- OGScope-AP 使用 ipv4.method shared,由 NM 提供 DHCP,避免客户端仅 169.254.x.x
- 指定 wifi-sec proto rsn 与 pairwise/group ccmp,减少弱加密提示
- init 前提示经 Wi‑Fi 的 SSH 可能中断;diag 检测旧版 manual AP
- 更新 wifi-nm.md:init 与 SSH、169.254 排查与 nmcli 就地升级说明

Made-with: Cursor
- 按浏览器语言检测默认 locale,并在 i18n 前同步 language-select
- 移动端顶栏字体、换行与按钮触控区域优化

Made-with: Cursor
…preview

- CameraManager.preview_jpeg_quality;流式 JPEG 尊重质量或走 raw 重编码 / Expose preview quality; stream JPEG re-encodes when quality differs
- get_stream_frame_bytes 支持 since_frame_id 与 304,避免 PNG 轮询狂抓帧 / since_frame_id + 304 to stop PNG polling sync grabs
- 拍照与录制经 get_raw_frame 共享读锁;移除未使用的旧预览 loop 与全局缓存 / Capture & recording use get_raw_frame; drop dead preview grabber
- 删除误导性 camera_instance 全局;修正超时测试(勿 patch monotonic)/ Remove dead camera_instance; fix timeout test without monotonic patch

Made-with: Cursor
…lish camera interactions

- 将系统/相机调试页迁移到 analysis-ui 架构并补齐中英文文案、导航与入口联动 / Migrate system and camera debug pages to analysis-ui with bilingual copy, navigation, and entry alignment
- 重构相机控制台布局与状态机,修复预览启停、长连接释放、按钮反馈及统计展示 / Refactor camera console layout and state machine to fix preview start/stop, stream release, button feedback, and metrics display
- 增加悬浮直方图、参数分组保存、系统后台回跳与解算页停止预览能力,更新构建产物 / Add floating histogram, grouped save actions, system-admin back navigation, and stop-preview in analysis page, plus refresh build artifacts

Made-with: Cursor
… output

- 文件详情按列表项键展开、再点收起与关闭按钮 / Key detail panel by list name, toggle and close
- 补齐 cam.files.closeDetail 双语与静态资源哈希 / Add i18n closeDetail and rebuilt analysis-lab assets

Made-with: Cursor
- 解算调度条固定预留高度,避免反复显隐推挤预览 / Fixed min-height for gate hint row
- 同步 analysis-lab 构建产物 / Sync Vite build output to web/static

Made-with: Cursor
…twork sync

- 显式 vendor 路径解析 Tetra3 图案库并校验 data/plate_solve/default_database.npz / Resolve Tetra3 DB via vendor path; verify plate DB path
- board-update 同步 WiFi 切换脚本与 ensure-systemd(可 OGSCOPE_SKIP_NETWORK_SYNC=1)/ Sync WiFi switch + ensure-systemd on board update

Made-with: Cursor
- 使用可变进度回调修复 FFmpeg 单例只绑定首次 onProgress 的问题 / Use mutable progress callback for FFmpeg singleton
- 转码器加载与下载池文件阶段补充进度与文案 / Progress and copy for loader and pool download
- 同步 analysis-lab 构建产物 / Sync analysis-lab build output

Made-with: Cursor
… 2 pickle policy

- np.load 增加 allow_pickle=True 以加载含 object 数组的官方 .npz / Add allow_pickle=True for upstream .npz with object arrays
- 修复解析控制台首次解算报错 / Fix first-solve error in analysis console

Made-with: Cursor
- 统一 WiFi、诊断脚本与相关单测格式 / Normalize WiFi, diagnose script, and tests

Made-with: Cursor
@YihuiLu YihuiLu merged commit bf8d67f into dev Apr 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant