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 行删除
+16 -12
查看文件
@@ -5,6 +5,9 @@ module.exports = {
subtitle: '基于多光谱反射的肤质倾向参考',
scannedAt: '扫描时间',
overallTitle: '整体倾向',
faceTitle: '分区光疗方案',
faceTapHint: '点击分区可查看该光的功效介绍',
allNormalHint: '未发现明显问题区域,可进行日常舒缓养护',
regionTitle: '分区分析',
recommendTitle: '推荐护理',
noProblem: '未见明显倾向',
@@ -19,12 +22,11 @@ module.exports = {
pigment: '色素 / 暗黄',
deep: '深层循环 / 疲劳'
},
regionNames: {
right: '右脸',
left: '左脸',
top: '额头',
middle: '鼻区',
bottom: '下巴'
modeNames: {
red: '嫩肤焕亮',
ir: '深层焕活',
uv: '净痘控油',
yellow: '匀净提亮'
}
},
en: {
@@ -32,6 +34,9 @@ module.exports = {
subtitle: 'Skin-tendency reference from multispectral reflection',
scannedAt: 'Scanned at',
overallTitle: 'Overall Tendency',
faceTitle: 'Zone Care Map',
faceTapHint: 'Tap a zone to learn about its light',
allNormalHint: 'No notable concerns found — a gentle daily care session works well',
regionTitle: 'Zone Analysis',
recommendTitle: 'Recommended Care',
noProblem: 'No notable tendency',
@@ -46,12 +51,11 @@ module.exports = {
pigment: 'Pigment / Sallowness',
deep: 'Deep circulation / Fatigue'
},
regionNames: {
right: 'Right cheek',
left: 'Left cheek',
top: 'Forehead',
middle: 'Nose',
bottom: 'Chin'
modeNames: {
red: 'Glow & Firm',
ir: 'Deep Revive',
uv: 'Clear & Balance',
yellow: 'Even & Brighten'
}
}
}