feat(diagnosis): 按新协议实现多光谱诊断算法+分区差异化下发+报告面罩图

- 新协议《协议简述-添加扫描时光色》落地: FFE4 Byte17 高3位=扫描光色(1红/2红外/3紫外/4暖黄),
  低5位保留贴合状态; Byte18=0xFF 故障; auto-scan 按光色分桶采集(旧固件无标识归 red 桶降级)
- diagnosis.js 重写: PD极性(值大=吸收多,固件已确认) NR=本区/本色5区平均-1;
  每区4色argmax>0.10判定; 3路PD区几何平均+MAD剔奇异(3σ对n=3失效,审计实证);
  严重度0.05/0.15/0.30仅展示; 全参数走 diagnosis_config 热调(极性/阈值/PD映射/亮度)
- buildVendorCommand 支持 plan 多区多色单命令下发(每IO独立 红/红外/紫外/暖黄);
  builder层安全硬上限 治疗亮度≤204(80%) 时长≤600s
- 区域映射修正: 掩码=IO纵列 左0x01/中上0x02/中0x04/中下0x08/右0x10,
  修复 treatment-setup/manual/treating/getRegionName/i18n 共7处标签错位, FULL_FACE 0x7F→0x1F
- 扫描报告页: 新增分区面罩示意图(5区按推荐光着色+模式名+严重度,点击跳光疗介绍),
  推荐护理改一条命令多色下发(亮度204); 扫描中设备故障即时中止
- schema.sql diagnosis_config 种子更新(新结构); i18n 清理死键,中英对齐25/24键
这个提交包含在:
Guoguo
2026-07-28 04:36:51 -07:00
父节点 b5416f56af
当前提交 6b91ebe35d
修改 19 个文件,包含 505 行新增234 行删除
+2
查看文件
@@ -17,6 +17,7 @@ module.exports = {
doneStatusPost: ' 帧),正在启动治疗...',
notWorn: '面膜未佩戴好,请重新佩戴后再试',
timeout: '检测超时,未收到数据,请重试',
deviceFault: '设备异常,扫描已停止,请重启设备后再试',
cmdFailed: '检测命令发送失败'
},
en: {
@@ -35,6 +36,7 @@ module.exports = {
doneStatusPost: ' frames), starting treatment...',
notWorn: 'The mask is not worn properly. Please re-fit and try again',
timeout: 'Scan timed out with no data. Please try again',
deviceFault: 'Device error — scan stopped. Please restart the device and try again',
cmdFailed: 'Failed to send scan command'
}
}