♻️ refactor(bin-loader): 重构二进制帧格式以匹配设备协议

- 将 TEMF v1 格式替换为设备 0x85 数据帧格式(10 字节帧头 + 54 字节元数据 + ADC 数据)
- 重写 encodeBin/decodeBin 函数以支持交织排列的 ADC 采样数据
- 更新记录页面使用设备配置中的 sampleFreqCode 替代从二进制文件解析的值
- 在导入项目时从设备配置获取 accNum 以适配新格式
This commit is contained in:
2026-06-21 17:34:58 +08:00
parent e1ca0d8512
commit 9b1ce66f4b
3 changed files with 121 additions and 92 deletions
+3 -1
View File
@@ -192,6 +192,8 @@ export default function RecordsScreen() {
await resumeSession(newSessionId, projectId);
};
const sampleFreqCode = useDeviceStore((s) => s.config.sampleFreq);
const handleFramePress = async (pf: PersistedFrame) => {
if (!pf.binPath) return;
const loaded = await BinLoader.loadBinFile(pf.binPath);
@@ -202,7 +204,7 @@ export default function RecordsScreen() {
adcUV: loaded.adcUV,
accNum: pf.accNum,
gain: pf.gain,
sampleFreqCode: loaded.sampleFreqCode,
sampleFreqCode,
timestamp: pf.timestamp,
frameId: pf.frameId,
};