chore: 新增大量静态资源、测试桩文件与配置文件,清理旧无用资源

本次提交新增了多种字体、UI图片、音频剪辑等静态资源,添加了测试桩文件与项目配置文件,同时清理了部分已废弃的旧图片与测试桩代码文件。
This commit is contained in:
hex2077 committed 2026-09-22 00:42:26 +08:00
1 parent 1051209d80
commit 6a7f4e010b
1761 files changed
+195222 -6037

No files matched your search

+1 -4
View File
@@ -9,16 +9,13 @@ This directory contains AI Passport engineering rules and reusable workflows, gr
## AI workflow
- [ai-guide.md](ai-guide.md): AI-assisted development workflow.
- [Core AI skills](../../skills/README.md): development, setup, build, device testing, and diagnosis; installation and usage examples.
## Engineering
- [environment-setup.md](engineering/environment-setup.md): clean-machine bootstrap for AI agents, including international and mainland China download routes.
- [build-and-test.md](engineering/build-and-test.md): ESP-IDF build and validation.
- [firmware-layout.md](engineering/firmware-layout.md): default and user-defined partition layouts and merged-artifact validation.
- [coding-conventions.md](engineering/coding-conventions.md): source-code and resource conventions, including Chinese font integration, blank/boxed text troubleshooting, and display acceptance.
- [lvgl-chinese-fonts.md](engineering/lvgl-chinese-fonts.md): step-by-step CJK configuration, font generation/linking, fallback examples, glyph checks, and troubleshooting.
- [wifi-provisioning.md](engineering/wifi-provisioning.md): Bluetooth-based Wi-Fi setup using the BLUFI reference branch, the companion mini program, and integration checks.
- [coding-conventions.md](engineering/coding-conventions.md): source-code and resource conventions.
## CI
+1 -4
View File
@@ -18,16 +18,13 @@
## AI 工作流
- [ai-guide.zh_CN.md](ai-guide.zh_CN.md):AI 开发工作流(面向 AI 编程助手:上下文建立、需求拆解、BSP 边界、验收交付格式)。
- [核心 AI 技能](../../skills/README.zh_CN.md):开发、环境准备、构建、真机测试及诊断,包含安装和使用示例。
## 工程约定(engineering)
- [environment-setup.zh_CN.md](engineering/environment-setup.zh_CN.md):AI 在全新机器上的环境引导,包含国际与中国大陆下载线路。
- [build-and-test.zh_CN.md](engineering/build-and-test.zh_CN.md):构建与验证(ESP-IDF 命令、逻辑测试、改动验证要求)。
- [firmware-layout.zh_CN.md](engineering/firmware-layout.zh_CN.md):默认/用户自定义分区布局与合并产物验证。
- [coding-conventions.zh_CN.md](engineering/coding-conventions.zh_CN.md):代码约定(语言风格、复用、注释、测试同步、资源约束等),包含中文字体接入、空白/方框排查与显示验收。
- [lvgl-chinese-fonts.zh_CN.md](engineering/lvgl-chinese-fonts.zh_CN.md):CJK 配置、字体生成/链接、fallback 示例、缺字检查和故障排查的分步指南。
- [wifi-provisioning.zh_CN.md](engineering/wifi-provisioning.zh_CN.md):参考 BLUFI 分支实现蓝牙 Wi-Fi 配网,包含配套小程序名称及接入检查。
- [coding-conventions.zh_CN.md](engineering/coding-conventions.zh_CN.md):代码约定(语言风格、复用、注释、测试同步、资源约束等)。
## CI(ci)
+6 -71
View File
@@ -9,7 +9,7 @@ This guide is for AI coding assistants. `AGENTS.md` is the only mandatory starti
## Establish context
1. Read `AGENTS.md` and follow its task routing. Do not load every README or the entire hardware guide by default.
2. Run `git status --short --branch` and preserve existing changes. Ensure the five required skills are available as specified in [AGENTS.md](../../AGENTS.md#required-ai-skills); the AI chooses and performs any missing installation, rather than handing setup to the user.
2. Run `git status --short --branch` and preserve existing changes.
3. Read affected public headers, implementations, and neighboring code. Do not infer this board's behavior from a generic ESP32-C3 board.
4. Search `origin/demo/*` for a relevant example and reuse only applicable design ideas.
5. Decompose the request into inputs, outputs, state, tasks, persistence, memory budget, and failure behavior before choosing `main` or `components/bsp`.
@@ -37,92 +37,27 @@ requirement
└─ bsp_pins.h pin and hardware-parameter source of truth
```
When maintaining the baseline hardware-test demo, a new test page implements the `enter`, `exit`, and `key` interface in `main/demo_<feature>.c`, is declared in `main/demo.h`, added to `main/CMakeLists.txt`, and registered in `main.c`. Extend demo-menu initialization and failure degradation for new optional peripherals. This registration pattern is not the required UI structure for derivative applications.
A new page implements the `enter`, `exit`, and `key` interface in `main/demo_<feature>.c`, is declared in `main/demo.h`, added to `main/CMakeLists.txt`, and registered in `main.c`. Extend menu initialization and failure degradation for new optional peripherals.
Only reusable hardware capabilities belong in the BSP. Document blocking behavior, task context, ownership, failures, and initialization order. Pins and I2C addresses belong only in `bsp_pins.h`.
### Mandatory UI redesign for derivative applications
Every derivative application must redesign and implement its own screens,
layout, visual presentation, navigation, and button interactions around its
requirements. This is a delivery requirement, not a default theme suggestion.
- Do not use the baseline `main` test menu, `demo_*.c` test screens, or the existing
`ui_pixel` demo visual shell as the application's UI, including by copying them
into renamed files. Renaming labels, changing colors, hiding test entries, or
adding a feature page to the same test shell does not satisfy this requirement.
- Reuse BSP drivers/APIs, ordinary LVGL widgets, isolated logic, and applicable
lifecycle/concurrency patterns. UI redesign does not require rewriting drivers
or banning a general visual style such as pixel art.
- Before declaring the UI implementation complete, inspect startup and navigation
paths to confirm they use the redesigned application screens, and describe the
new pages and controls in the handoff. An inherited test UI is incomplete work,
even if it builds. Report actual screen rendering as a separate device check.
The existing test UI may remain when the task is maintenance of the baseline
hardware-test demo itself; that is not derivative application development. This
rule does not require deleting the reference demo from the baseline repository.
## Runtime invariants
- Hold `bsp_lvgl_lock()` whenever non-LVGL context accesses LVGL objects.
- Button callbacks dispatch lightweight events only; move audio, storage, networking, and other slow work to worker tasks.
- Stop tasks and timers that may access a page before deleting its screen.
- When maintaining the baseline demo, preserve menu `UP`/`DOWN`, `OK` click to enter, and page `OK` long-press to return unless the change explicitly redefines them. Derivative applications define their own controls and navigation under the mandatory UI redesign rule above.
- Only hardware-validation pages remaining in the baseline demo use `ui_pixel_screen_create()` / `ui_pixel_panel_create()` to preserve that demo's presentation; do not carry its test shell into derivative applications.
- By default show the battery level in the top-right corner of a user interface (read via `bsp_battery_soc()`), unless the developer specifies a different placement or explicitly does not want it. Degrade gracefully when the reading is `-1` (unavailable) instead of drawing a number. Avoid overlapping the application's own content; when maintaining the baseline demo, also avoid its cloud decoration (`add_cloud`, around `x≈188, y≈8`).
- Preserve menu `UP`/`DOWN`, `OK` click to enter, and page `OK` long-press to return unless the change explicitly redefines them.
- The `main` menu, `demo_*.c` pages, and `ui_pixel` visuals are a board-capability demonstration, not a production application shell. A newly developed application must redesign and implement its own screens and interaction flow from its product requirements instead of directly shipping or copying the current demo UI. Reuse BSP interfaces and applicable implementation patterns; inherit the demo menu or visual theme only when the developer explicitly requests it. A hardware-validation page that intentionally remains part of the baseline demo should still use `ui_pixel_screen_create()` / `ui_pixel_panel_create()` for consistency.
- By default show the battery level in the top-right corner of a user interface (read via `bsp_battery_soc()`), unless the developer specifies a different placement or explicitly does not want it. Degrade gracefully when the reading is `-1` (unavailable) instead of drawing a number. Place it so it does not overlap the cloud decoration (`add_cloud`, around `x≈188, y≈8`) in the top-right; use the clear sky space rather than covering the cloud.
- Budget internal RAM for images, fonts, networking, audio, LVGL, and task stacks; this board has no PSRAM.
- Treat Chinese text as a font-integration task, not just a string translation. Follow the [Chinese font checklist](engineering/coding-conventions.md#chinese-fonts-and-missing-glyphs) when changing text, fonts, sizes, themes, or dynamic content; never hide missing-glyph boxes as a fix.
- Isolate testable state machines, protocols, timing, and layout calculations from ESP-IDF/LVGL and cover them with host tests.
## Material placement
When the developer submits a reusable asset through you — an image, font, audio clip, or similar project material — save it under the repository-root [`assets/`](../../assets/README.md) by default so it stays available for development and later reuse. Place it in the matching subdirectory (`assets/images/`, `assets/fonts/`, `assets/music/`) and record the destination, naming, integration method, and source/license in the [`assets/` README](../../assets/README.md). Never mix binary assets with Markdown documentation. Text-only application archives (cover metadata, manual, summary) belong in the repository-relative `docs/reference/<username>/<app-name>/`; experience entries belong in `docs/reference/<username>/`. Do not put those records in `assets/` or commit cover images into the archive. For reusable assets, deviate from `assets/` only when the developer explicitly directs another location.
When the developer submits a reusable asset through you — an image, font, audio clip, or similar project material — save it under the repository-root [`assets/`](../../assets/README.md) by default so it stays available for development and later reuse. Place it in the matching subdirectory (`assets/images/`, `assets/fonts/`, `assets/music/`) and record the destination, naming, integration method, and source/license in the [`assets/` README](../../assets/README.md). Never mix binary assets with Markdown documentation. Application or experience archive records (cover, manual, summary) belong in `reference/<username>/`, not in `assets/`; deviate from `assets/` only when the developer explicitly directs another location.
## Delivery
The automated gate is not hardware acceptance. Report `Build`, `Host tests`, `Device tests`, and `Unverified` separately. Use the [hardware guide](../hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md) for the applicable on-device matrix.
### Offer on-device testing
After fully implementing each user-requested firmware feature or fix and
running the applicable validation, proactively ask whether to flash the result
to the device for testing. This applies to each completed development iteration,
not just a project release. Do not end the handoff with only a build result or
firmware path. For example:
> The requested implementation is complete. Would you like me to flash the
> validated firmware to your device and test it now?
1. When device access is available, perform read-only USB/serial discovery
during handoff. Do not open/reset arbitrary ports or flash a device just
because it is connected. If multiple candidates exist or the target is
uncertain, ask the user to identify the intended device and port.
2. If no device is detected, explicitly prompt:
> No device was detected. Please turn the device on, then connect it to a
> USB port on your computer using a data-capable USB cable, not a charge-only
> cable. Let me know when it is connected so I can check again.
Recheck after the user connects it. If this environment cannot access the
user's USB devices, state that limitation instead of claiming no device is
connected; guide the user through local detection/flashing and request the
test results.
3. Before writing, confirm the target device, the exact validated firmware,
and its [flashing/data impact](engineering/firmware-layout.md#flashing-and-stored-data),
then obtain explicit approval for this flash. A connected device or a past
approval for another build is not authorization. Do not make a backup of the
original firmware a prerequisite, and do not assume permission for a
full-chip erase.
4. After approved flashing, verify startup and the requested behavior using
the applicable hardware checklist, with user observations where needed.
Successful flashing alone is not `Device tests: PASS`. If the user declines
or postpones testing, no device is available, or access is unavailable,
report `Device tests: NOT RUN` and list the pending checks in `Unverified`.
For documentation-only or other tasks that do not change firmware, explain
that on-device testing is not applicable; do not flash unrelated firmware just
to satisfy this workflow. This test invitation does not authorize commits,
pushes, or any of the optional [project-closing actions](release/project-completion.md).
Related documents: [build and test](engineering/build-and-test.md), [coding conventions](engineering/coding-conventions.md), [hardware guide](../hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md), [documentation index](../README.md), and [root `AGENTS.md`](../../AGENTS.md).
Loaded 3 of 1761 files, more files were not shown because too many files have changed in this diff. Show more