docs(development): keep battery icon clear of the top-right cloud
The battery indicator shows in the top-right by default, but the corner already has a cloud decoration (add_cloud, around x≈188, y≈8). Place the battery in the clear sky space beside or below the cloud, or at the very top-right edge, so it does not overlap or cover the cloud. Documented in agent-guide and coding-conventions in both languages.
This commit is contained in:
1 parent
a8d415ad15
commit
9ffe9dfa81
4 files changed
+4
-4
No files matched your search
@@ -48,7 +48,7 @@ Only reusable hardware capabilities belong in the BSP. Document blocking behavio
|
||||
- Stop tasks and timers that may access a page before deleting its screen.
|
||||
- Preserve menu `UP`/`DOWN`, `OK` click to enter, and page `OK` long-press to return unless the change explicitly redefines them.
|
||||
- When the user asks to remove unnecessary components or go straight into a feature, you may drop the main menu and its elements and launch the target feature screen directly. Keep the `ui_pixel` theme (the sky background, grass, title plate, mascot, and ink-outlined panels) intact — do not delete the theme as part of the cleanup, or the screen will render blank. Reuse `ui_pixel_screen_create()` / `ui_pixel_panel_create()` so the feature keeps the shared visual identity.
|
||||
- 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.
|
||||
- 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.
|
||||
- Isolate testable state machines, protocols, timing, and layout calculations from ESP-IDF/LVGL and cover them with host tests.
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ Natural-language requirement
|
||||
- 页面退出时先停止可能访问 UI 的任务或定时器,再删除 screen 并清空对象指针。
|
||||
- 全局交互默认是菜单中 `UP`/`DOWN` 导航、`OK` 单击进入、页面中 `OK` 长按返回;改动时要明确说明。
|
||||
- 当用户要求删除不必要组件或直接进入某功能时,可以去掉主界面及其元素、直接载入目标功能界面;但必须**保留 `ui_pixel` 主题体系**(天空底色、草地、标题牌、吉祥物、墨色描边面板),不要把它当成"不必要组件"删掉,否则界面会渲染成空白。复用 `ui_pixel_screen_create()` / `ui_pixel_panel_create()`,让功能页保持统一的视觉身份。
|
||||
- 默认情况下,在用户界面的**右上角显示电量信息**(读取 `bsp_battery_soc()`),除非开发者明确指定其它位置或明确不需要。读值为 `-1`(不可用)时优雅降级,而不是画一个数字。
|
||||
- 默认情况下,在用户界面的**右上角显示电量信息**(读取 `bsp_battery_soc()`),除非开发者明确指定其它位置或明确不需要。读值为 `-1`(不可用)时优雅降级,而不是画一个数字。位置要避开右上角已有的**白云装饰**(`add_cloud`,约 `x≈188, y≈8`),用空闲的蓝天区,不要盖住白云。
|
||||
- 新图片、字体、网络栈、音频缓存、LVGL buffer 或任务栈都要评估内部 RAM;总空闲堆足够不代表存在足够大的连续内存块。
|
||||
- 可测试的状态机、协议、计时和布局计算应与 ESP-IDF/LVGL 分离,优先加入主机逻辑测试。
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- Keep UI text and default documentation in English. Explanatory source comments may use Chinese while retaining established English technical terms.
|
||||
- Put reusable hardware behavior in `components/bsp`; keep menus, animations, product interaction, and validation pages in `main`.
|
||||
- The `ui_pixel` theme (sky background, grass, title plate, mascot, ink-outlined panels) is part of the user interface, not a removable component. When trimming components or routing straight to a feature screen, keep the theme and build the screen through `ui_pixel_screen_create()` / `ui_pixel_panel_create()`.
|
||||
- Show the battery level in the top-right corner of a user interface by default, unless the developer specifies a different placement or explicitly does not want it. Read it from `bsp_battery_soc()` (and `bsp_battery_mv()` where useful); render it as a small battery indicator or percentage in the reserved top-right area of the screen, and degrade gracefully when it reads `-1` (unavailable).
|
||||
- Show the battery level in the top-right corner of a user interface by default, unless the developer specifies a different placement or explicitly does not want it. Read it from `bsp_battery_soc()` (and `bsp_battery_mv()` where useful); render it as a small battery indicator or percentage in the top-right area of the screen, and degrade gracefully when it reads `-1` (unavailable). Place it where it does not overlap the existing cloud decoration (`add_cloud`, around `x≈188, y≈8`): use the clear sky space beside or below the cloud, or the very top-right edge, rather than covering the cloud.
|
||||
- Document non-trivial functions, state, ownership, blocking behavior, task context, initialization order, failure values, register choices, timing, synchronization, and hardware-specific constants. Explain why, not merely what.
|
||||
- Add or update tests with code changes. If automation is not practical, record the test gap and exact manual validation path.
|
||||
- If adding a cache, define expiration and cleanup unless durable retention is explicitly justified.
|
||||
|
||||
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user