Skip to content

Dev latest#15

Open
YihuiLu wants to merge 62 commits into
devfrom
dev-latest
Open

Dev latest#15
YihuiLu wants to merge 62 commits into
devfrom
dev-latest

Conversation

@YihuiLu
Copy link
Copy Markdown
Contributor

@YihuiLu YihuiLu commented Apr 21, 2026

No description provided.

YihuiLu and others added 30 commits April 6, 2026 14:30
- 新增 ogscope_prompt_mirror_if_needed:TTY 下询问 PyPI/apt 区域 / Prompt for CN vs international on TTY
- 支持 OGSCOPE_NONINTERACTIVE 跳过询问 / Skip prompt for CI and automation

Made-with: Cursor
…mpts

- 新增 boot-config-camera.sh:写入 camera_auto_detect=0 与 dtoverlay=imx327(菜单走 stderr 避免 $(...) 吞输出)
- install.sh / board-update.sh:交互选择摄像头;文档补充 OGSCOPE_CAMERA 等变量
- mirror.sh:镜像选项为全球 / 中国大陆 / 自动;默认全球

Made-with: Cursor
- 删除 astropy、skyfield、python-dateutil、sqlalchemy、alembic / Drop unused astronomy and ORM packages
- 移除 dev 中 types-python-dateutil / Remove types-python-dateutil from dev group
- 更新 poetry.lock / Refresh poetry.lock

Made-with: Cursor
…ome page

- 接入首页实时视频流与单帧解算循环,复用分析后台节流门禁并增加失败冷却 / Wire live stream + frame solve loop on home, reuse analysis throttling gate, and add failure cooldown
- 新增图层开关、星点叠加、极轴引导与雷达扫描提示,匹配现有 HUD 风格 / Add layer toggles, star overlays, polar guidance, and radar scan indicator aligned with existing HUD style
- 优化首页可视遮罩与资源打包路径,提升亮场可读性并支持离线字体样式 / Refine home masking and bundled style assets to improve bright-scene readability with offline fonts

Made-with: Cursor
…persistent journald and IMX327 boot sync

- 新增 journald drop-in 并在 install/board-update 中安装,便于卡死后用 journalctl -b -1 排查 / Add journald drop-in for persistent logs across reboots
- IMX327 dtoverlay 插入到 vc4-kms-v3d 之后,避免仅末尾写入导致固件未加载 / Insert IMX327 dtoverlay after vc4-kms-v3d for reliable firmware load
- sync_dev_board 同步主页模板、HUD CSS 与字体到开发板 / Sync home template, HUD CSS, and fonts to dev board

Made-with: Cursor
…ve UX upgrades

- 后端新增过密/共线质心剔除与剔除档位透传,返回 centroid_quality 及被剔除坐标用于可视化 / Add dense+collinear centroid rejection with level propagation, returning centroid_quality and rejected coordinates for visualization
- 前端视频解算台改为门禁对齐调度、右下角气泡与最多 10 组历史记录,并补充质心剔除档位控件 / Refactor video solve loop to gate-aligned scheduling with toast notifications and 10-group history, plus centroid rejection level controls
- 叠加层新增红叉显示已剔除质心,并统一将 Tetra3 Prob 按假阳性概率换算为 0-100% 匹配置信度展示 / Add red-cross overlay for rejected centroids and normalize Tetra3 Prob as false-positive probability into 0-100% match confidence

Made-with: Cursor
…, remove Jinja, Vite home HUD

- 将 analysis-ui 重命名为 spa,按 apps/shared/entries 重组并增加路径别名 / Rename analysis-ui to spa, restructure with apps/shared/entries and aliases
- 删除 Jinja 模板与 template_dir,FastAPI 直接返回 analysis-lab 下 HTML 与 /manifest.json / Drop Jinja templates; FastAPI serves built HTML and manifest
- 新增 home.html 入口与 HomeApp(注入 HUD DOM + 既有 /static/js 链)/ Add home entry and HomeApp with legacy script pipeline
- 更新 CI、同步脚本、CLAUDE 与构建产物 / Update CI, sync script, CLAUDE, build artifacts
- 注:Git 可能将 home 资源与已删 index.html 标为重命名,语义无关 / Git may show spurious rename from deleted index.html to home bundle

Made-with: Cursor
…radar feedback

- 修复 MJPEG 尺寸回退、极轴引导显示条件与叠加淡出流程,恢复极轴/质心/标注稳定渲染 / Fix MJPEG size fallback, polar guide visibility conditions, and overlay fade flow to restore stable polar/centroid/label rendering
- 接入排除质心打叉与星名标签绘制,并将置信度显示对齐解算控制台的一位小数逻辑 / Add rejected-centroid cross markers and star labels, and align confidence display with lab console one-decimal logic
- 增强首页雷达扫描动画冲击波效果,提升解算触发反馈可见性 / Enhance home radar sweep shockwave animation for clearer solve-trigger feedback

Made-with: Cursor
… (SPA + I2C client)

- 新增 ogscope.modules.zacp 与 /api/debug/zacp REST,poetry extra zacp(smbus2)
- 系统调试台增加 ZACP 页面与 i18n;修复 client.send_command 损坏逻辑与 CRC/NACK 解析
- sync_dev_board 同步 ZACP Python 与 SPA 产物,移除无效模板 rsync

Made-with: Cursor
- 采集管线水平/垂直镜像,REST 与 .env 持久化,预设与备份恢复一致 / Pipeline flip, API, env, presets, backup
- 相机控制台镜像开关并移除误导性「帧数」/ Camera console mirror toggles; remove misleading frame count
- 寻星台解算门禁可读提示与 MJPEG 说明 / Lab gate hints and MJPEG copy
- 单元测试 test_camera_flip 与 Vite 构建产物 / Unit test and static bundle

Made-with: Cursor
- 将 stream_max_mjpeg_clients 默认改为 2;0 仍为不限制 / Set default stream_max_mjpeg_clients to 2; 0 remains unlimited
- 低内存 systemd drop-in 同步为 2 并补充注释 / Align low-RAM drop-in to 2 with comment
- 增加两路上限单元测试与 i18n 文案 / Add unit test and update i18n hints

Made-with: Cursor
- 忽略「.coverage *」及带空格编号的 js/html 构建副本 / Ignore spaced coverage files and numbered js/html dupes
- 本地已删除 .coverage 2/3、analysis-lab 副本、.git/index 2/3、node_modules 与 venv 内重复目录(未纳入版本库)/ Local junk removed (untracked paths)

Made-with: Cursor
…imeout

- wait_for 包裹取帧、分段 sleep、request.is_disconnected 检测 / Wrap frame fetch with wait_for, chunked sleep, disconnect checks
- 新增 stream_mjpeg_frame_fetch_timeout_ms(OGSCOPE_STREAM_MJPEG_FRAME_FETCH_TIMEOUT_MS)/ Add configurable per-frame timeout
- 新增 mjpeg_stream_helpers 与单元测试 / Add helper module and unit tests

Made-with: Cursor
…-latest

- 解决 analysis-lab 资源哈希冲突,npm run build 重生成产物
- 保留 dev-latest 与 ZACP 合并后的 SPA、API、i18n

Made-with: Cursor
…astrometry plate-solve snapshot + Cursor rule

- 将 plate_solver、platesolve API、deploy/docker/ui 脚本与测试图纳入 archive/ 只读快照
- 新增 INTEGRATION_TODO 与 SOURCE_COMMIT;ruff/black 排除 archive
- .cursor/rules:禁止日常修改封存目录,避免与 plate_solve 主线重复开发

Made-with: Cursor
…and Cursor rule

- 删除 archive/ 与 .cursor/rules 中封存项;恢复 pyproject 中 ruff/black 对 archive 的排除

Made-with: Cursor
… (SPA + I2C client)

- 新增 ogscope.modules.zacp 与 /api/debug/zacp REST,poetry extra zacp(smbus2)
- 系统调试台增加 ZACP 页面与 i18n;修复 client.send_command 损坏逻辑与 CRC/NACK 解析
- sync_dev_board 同步 ZACP Python 与 SPA 产物,移除无效模板 rsync

Made-with: Cursor
Sending commands always works but reading back responses may be delayed
due to various reasons. Account that by polling responses until valid
data is received.
Made-with: Cursor

# Conflicts:
#	ogscope/modules/zacp/client.py
#	web/static/analysis-lab/assets/analysis-D131RA5U.js
#	web/static/analysis-lab/assets/camera-BVFOS63n.js
#	web/static/analysis-lab/assets/refresh-cw-BYuMVQQH.js
#	web/static/analysis-lab/assets/refresh-cw-DRlSvl_y.js
#	web/static/analysis-lab/assets/refresh-cw-n0ZYeFUa.js
#	web/static/analysis-lab/assets/trash-2-BOQ2gl-0.js
#	web/static/analysis-lab/assets/trash-2-CcqPbceT.js
#	web/static/analysis-lab/assets/trash-2-CpaDFDUp.js
#	web/static/analysis-lab/camera.html
#	web/static/analysis-lab/index.html
#	web/static/analysis-lab/system.html
…n calls

- 将调试相机接口中的 BaseModel.dict() 替换为 model_dump() / Replace BaseModel.dict() with model_dump() in debug camera endpoints
- 消除单元测试中的 Pydantic 弃用告警 / Remove Pydantic deprecation warnings in unit tests

Made-with: Cursor
…g and migrate Zenit call paths

- 新增产品无关的 /api/core/v1 契约接口并统一 Core 命名,移除 Zenit 兼容别名 / Add product-agnostic /api/core/v1 contract endpoints with unified Core naming and remove Zenit aliases
- 拆分能力注册与应用服务层,弱化 ZACP 强依赖并将 I2C 安装入口从 OGScope 移除 / Introduce capability registry and application service layer, reduce hard ZACP coupling, and remove I2C install entry from OGScope
- 补充契约文档与单元测试,供 ZenitScope 跨版本对接 / Add contract docs and unit tests for cross-version ZenitScope integration

Made-with: Cursor
…omer-facing camera and system capabilities

- 新增 core/v1 相机流、状态、视频元信息与参数微调接口,并复用现有调试侧稳定流控逻辑 / Add core/v1 camera stream, status, video metadata, and tuning endpoints by reusing proven debug-side stream control behavior
- 扩展系统状态聚合,补充传感器与网络摘要,便于上层服务统一读取运行健康信息 / Extend system status with sensor and network summaries for unified upstream health consumption
- 增加契约文档与单元测试覆盖,固定新增接口字段与兼容预期 / Add contract docs and unit tests to lock new fields and compatibility expectations

Made-with: Cursor
… and doc model cleanup

- 将分析与调试接口迁移到 /api/dev 域,默认文档只展示 core 契约并新增 /docs/dev 与 /docs/all 入口 / Move analysis and debug endpoints under /api/dev, make /docs core-only, and add /docs/dev + /docs/all entries
- 修复 core 相机契约细节(digital_gain 独立生效、视频文件名安全校验、状态语义统一)并补全视频响应模型 / Fix core camera contract details including standalone digital_gain, filename safety validation, and consistent status semantics with explicit video response models
- 同步前端调用路径与契约文档,补充文档拆分与路由安全回归测试 / Sync frontend API paths and contract docs, and add regression tests for docs split and route safety

Made-with: Cursor
…dev domain and sync frontend paths

- 将系统状态路由纳入 /api/dev/system 并在 dev 文档分组展示,同时保留旧路径兼容入口隐藏在文档之外 / Place system status routes under /api/dev/system with dev docs grouping while keeping hidden legacy compatibility aliases
- 同步前端系统状态请求到新 dev 路径并更新静态构建产物,确保调试台与系统页读取一致 / Update frontend system info calls to the new dev path and refresh built static assets for consistent runtime behavior
- 完成重新构建与服务重启后的接口可用性验证,确保 /docs/dev 与 /api/dev/system/info 可正常访问 / Verify availability after rebuild and restart, including /docs/dev and /api/dev/system/info

Made-with: Cursor
Split backend and frontend into domain-oriented core/dev/shared layers, and centralize shared stream/file/transport utilities while removing legacy route compatibility.

Made-with: Cursor
将业务逻辑进一步下沉到 domain 层并瘦身路由适配器,同时补充 core/dev 关键路径与共享模块测试,降低后续演进回归风险。

Made-with: Cursor
Remove final domain-to-web dependencies for camera/analysis/network and align unit tests with the new domain/service boundaries.

Made-with: Cursor
YihuiLu and others added 30 commits April 17, 2026 22:49
…orkflow rules

- 新增 OGScope 与 ZenitScope 联动开发流程文档,明确边界、顺序与联调基线 / Add OGScope-ZenitScope collaboration guide with boundaries, change order, and runtime baseline
- 更新 OGScope CLAUDE.md,要求协同开发按契约优先和双仓验证流程执行 / Update OGScope CLAUDE.md to enforce contract-first and dual-repo verification workflow
…ance and Cursor multi-root practice

- 更新 OGScope 的 CLAUDE 协同规则,明确双项目根会话与分仓提交流程 / Update OGScope CLAUDE collaboration rules with multi-root and per-repo commit workflow
- 扩展跨仓联动文档,新增 Cursor 双根会话与防串仓检查项 / Extend cross-project guide with multi-root usage and anti-cross-repo checks
…y and shared hardware plane

- 更新系统级架构说明与 mermaid 边界 / Update system-level narrative and mermaid boundaries
- 引入硬件平面客户端与主导租约等概念 / Introduce hardware plane client and leader lease concepts

Made-with: Cursor
Remove Core duplicate MJPEG and stream status routes; add dev stream/status.
Update docs, SW bypass rules, static JS stream URLs, and contract tests.

Made-with: Cursor
Avoid fetch(MJPEG) probe consuming limiter slots; gate analysis lab before img.
Log 503 rejections; default stream_max_mjpeg_clients 4; update low-ram drop-in and i18n.

Made-with: Cursor
…s-lab

- Analysis lab: shared stream/status gate helper and MJPEG img onError retry
- Camera console: show OGSCOPE_SHARED_PREVIEW_FPS via stream status; i18n
- Refresh Vite bundles under web/static/analysis-lab/

Made-with: Cursor
Add AK09911 and MPU-6050 debug endpoints, ak09911_i2c hardware module,
SensorsPage in system console, i18n, and rebuilt analysis-lab assets.

Made-with: Cursor
Add GET /debug/sensors/mpu6050/gyro-sample, sensors UI component, i18n, and rebuild analysis-lab assets.

Made-with: Cursor
Add imu-sample API and UI; compass panel; rebuild analysis-lab static assets.

Made-with: Cursor
Rebuild analysis-lab static bundle.

Made-with: Cursor
Add boot-config-i2c.sh (i2c-tools, i2c group, dtparam=i2c_arm=on); wire install.sh and board-update.sh.

Made-with: Cursor
…r hints

Use scan_i2c_bus for addresses_parsed/target_addr_seen; hint when addr absent on bus.

Made-with: Cursor
Replace luma.lcd with spidev + RPi.GPIO; default display to st7796; chunk
pixel transfers for spidev 4KiB limit; update gpio/config defaults.

Made-with: Cursor
Wire HmiService to ST7796 test patterns; optional command timeout; HmiPage
in dev system shell; i18n and Vite build artifacts.

Made-with: Cursor
Introduce role-based hardware-plane runtime with zenit_subordinate minimal surface, add UDS JSON-RPC sensor delegation path, and document/test the REST-plus-sensor-UDS collaboration boundary.

Made-with: Cursor
- 新增 docs/README 与多份 *_EN 配对;根 README 收敛文档节

- Add docs/README index (A–E groups); CONTRIBUTING_EN and contract EN files

Made-with: Cursor
更新为新的架构 / Update to the new architecture
- 新增 OGSCOPE_DEVELOPMENT_MODE 配置与启动日志提示 / Add OGSCOPE_DEVELOPMENT_MODE setting and startup log hints
- install/board-update 写入 systemd 环境并同步文档用法 / install/board-update write systemd env; sync minimal docs usage
- 开发模式下提升标准库 logging 与异常栈可观测性 / Dev mode improves stdlib logging and exception observability

Co-authored-by: Cursor <cursoragent@cursor.com>
…vs 0x0D

- CAD 决定地址时回退读取 WIA,修正默认 0x0C 与硬件 0x0D 不一致导致的 EREMOTEIO / Fallback WIA read when CAD selects 0x0D vs default 0x0C
- sample 与 probe-buses 同步使用解析地址 / sample and probe-buses use resolved address
- 更新 debug 路由 Query 说明 / Update debug route query descriptions

Co-authored-by: Cursor <cursoragent@cursor.com>
…sion + retries

- measure_heading_with_cad_fallback:同一会话内 WIA 后读数,0x0C/0x0D 轮换与总线重试减轻 121 / One session then retries across CAD addrs
- probe WIA2 接受 0x05(AK09911C)/ Accept WIA2 0x05 for AK09911C in probe_ak09911
- sample API 返回 addr_7bit_requested 与 addr_auto_fallback / Sample response includes address metadata

Co-authored-by: Cursor <cursoragent@cursor.com>
- 按总线 asyncio.Lock 串行 magnetometer 与 MPU 调试 SMBus,减轻与陀螺并发时的 121 / Per-bus lock across mag & MPU debug
- AK09911 读块与 ST2 重试、WIA 后短延时、默认 8 轮总线重试 / Block read retries, settle, more bus retries
- 罗盘面板丢弃过期 fetch、live 间隔 850ms / Stale sample guard; slower live poll

Co-authored-by: Cursor <cursoragent@cursor.com>
…low with visible status

- 在开发者传感器诊断台加入方向校准 start/commit/reset/status 接口与前端按钮引导 / Add calibration APIs and guided controls in sensor diagnostics
- 采样输出支持 auto/recording/locked 模式并回传锁定参数与诊断字段 / Support auto-recording-locked heading modes with lock metadata and diagnostics
- 优化校准交互反馈(模式、样本数、实时状态)并同步 i18n 与静态产物 / Improve calibration UX feedback with mode-sample live status and update i18n/static assets

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants