docs: 调整为7种传感器类型并规划配对时手动按键微调后缀序号逻辑

This commit is contained in:
2026-07-09 11:32:00 +08:00
parent 89ff52c9b3
commit 8704a63e20
15 changed files with 142 additions and 39 deletions

View File

@@ -68,4 +68,33 @@ void UI_ShowBindingPage(void) {
FormatHex(bracelet_factory_id, id_str);
LCD_ShowStringCentered(180, id_str, COLOR_GRAY, COLOR_BLACK);
}
### 2.6 对码确认与序号微调页渲染
`main.c` 中通过以下方式渲染可供按键微调的数字后缀界面:
```c
void UI_ShowPairConfirmPage(u8 type, u8 selected_suffix) {
char num_buf[10];
LCD_Clear(COLOR_BLACK);
LCD_ShowStringCentered(40, "v RECU", COLOR_GREEN, COLOR_BLACK);
// 根据类型渲染 32x32 图标
// ...
// 居中显示预设名称前缀
LCD_ShowStringCentered(135, sensor_prefixes[type], COLOR_WHITE, COLOR_BLACK);
// 拼接成带选框的 "[ 02 ]" 格式字符串并高亮居中渲染
num_buf[0] = '[';
num_buf[1] = ' ';
num_buf[2] = ' ';
num_buf[3] = '0' + (selected_suffix / 10);
num_buf[4] = '0' + (selected_suffix % 10);
num_buf[5] = ' ';
num_buf[6] = ' ';
num_buf[7] = ']';
num_buf[8] = '\0';
LCD_ShowStringCentered(165, num_buf, COLOR_CYAN, COLOR_BLACK);
}
```
```