feat(battery): load custom CW2017 profile
This commit is contained in:
1 parent
8c4f17eb19
commit
7eeb76dbdf
6 files changed
+140
-8
No files matched your search
@@ -6,6 +6,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Added the supplied 80-byte CW2017 profile for the specified 520 mAh cell, including content/update-flag checks, verified writes, the required restart sequence, and bounded SOC-readiness polling.
|
||||
|
||||
- Reorganized the documentation by function area with a dual entry point: the root `AGENTS.md` is now a thin router (hard constraints + task routing only) and the detailed AI workflow lives in `docs/development/ai-guide.md`; `agent-guide.md` was folded in. `docs/development/` gained a second level (`engineering/`, `ci/`, `release/`), and the `plays/` application archive and `experiences/` moved into a `docs/reference/` area with a dedicated README. Removed `docs/software-design/` (empty scaffold); folded the three `assets/{fonts,images,music}/README` leaves into the `assets/` README; flattened the six `project-completion` sub-documents into a single file; and unified each directory to a single README, eliminating every `INDEX` file and a duplicated experience index. All cross-references and bibliographic links were updated; no content was dropped.
|
||||
|
||||
- Made mini-program BLE install compatibility a template-level invariant: fixed
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- 加入厂家为优特利 520mAh 电芯生成的 80 字节 CW2017 profile,并实现内容与更新标志检查、写入后校验、规定的重启时序以及有上限的 SOC 就绪等待。
|
||||
|
||||
- 按功能域整理文档并采用双入口:根目录 `AGENTS.md` 变为薄路由(只保留硬约束与任务路由),详细的 AI 开发工作流下沉到 `docs/development/ai-guide.md`,`agent-guide.md` 并入其中。为 `docs/development/` 增加二级分区(`engineering/`、`ci/`、`release/`),把 `plays/` 应用档案与 `experiences/` 移入带专属 README 的 `docs/reference/` 参考区;删除 `docs/software-design/`(空脚手架);把 `assets/{fonts,images,music}/README` 三个叶子 README 并入 `assets/` README;把 `project-completion` 的六个子文档压平为单文件;并把每个目录统一为单一 README,消除所有 `INDEX` 文件与一处重复经验索引。所有交叉引用与文献链接已更新;未丢弃任何内容。
|
||||
|
||||
- 将小程序 BLE 安装兼容提升为二创模板强制契约:固定保护 `cardid`/Recovery 分区,
|
||||
|
||||
@@ -156,7 +156,7 @@ The audio demo's three-second recording buffer is about 96 KB and is the largest
|
||||
|
||||
## 9. CW2017 fuel gauge
|
||||
|
||||
Initialization reads VERSION, writes CONFIG `0x00`, waits 100 ms, and uses the chip's built-in Li-Poly profile. The repository intentionally does not write a custom cell profile.
|
||||
Initialization reads VERSION and checks the profile update flag plus all 80 profile bytes. When needed, it puts the gauge to sleep, writes and verifies the supplied profile for the specified 520 mAh cell, sets the update flag, restarts the gauge with the required `0x30` to `0x00` sequence, and waits up to five seconds for a valid SOC. Replacing the cell requires a matching vendor-generated profile and renewed charge/discharge validation.
|
||||
|
||||
- SOC uses registers `0x04–0x05`; values above 100 are treated as not ready and return `-1`.
|
||||
- Voltage uses the 14-bit value at `0x02–0x03`, converted as `raw × 312.5 µV`, and returned in mV.
|
||||
|
||||
Loaded 3 of 6 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user