Skip to content

fix: resolve signal decoding in detail panel for BLF/ASC drag-drop trace#372

Open
lixiaoxie wants to merge 1 commit into
pr/lin-trace-uifrom
pr/fix-blf-signal
Open

fix: resolve signal decoding in detail panel for BLF/ASC drag-drop trace#372
lixiaoxie wants to merge 1 commit into
pr/lin-trace-uifrom
pr/fix-blf-signal

Conversation

@lixiaoxie
Copy link
Copy Markdown
Collaborator

Fix signal decoding failure when clicking trace rows after loading BLF/ASC files via drag-and-drop.

Root cause: row.channel contains device name (e.g. 'PEAK CAN-USB FD') for BLF-loaded data, not 'CH1' format. parseInt(row.channel.replace('CH','')) returns NaN, causing DBC cache lookup to silently fail.

Fix: Fallback to parsing row.bus field ('CAN 1'/'Lin 0') when row.channel cannot be resolved to a valid cache key. Applied to both CAN and LIN decode paths.

Stack: 4/4 — depends on #371

@lixiaoxie
Copy link
Copy Markdown
Collaborator Author

概述

修复拖拽 BLF/ASC 文件加载后,点击 Trace 条目时 Detail 面板信号不解析的问题。

根因

row.channel 对 BLF 加载的数据存储的是设备名(如 'PEAK CAN-USB FD'),而非 'CH1' 格式。parseInt(row.channel.replace('CH','')) 返回 NaN,导致 DBC 缓存查找静默失败,信号无法解码。

修复方式

row.channel 无法解析为有效缓存 key 时,回退到 row.bus 字段('CAN 1' / 'Lin 0')获取正确的通道编号。CAN 和 LIN 两条解码路径均已修复。

堆叠 PR:4/4,依赖 #371

When BLF/ASC files are loaded via drag-and-drop, row.channel contains
the device name instead of 'CH1' format. The DBC cache lookup used
parseInt(row.channel.replace('CH','')) which returned NaN, causing
signal decoding to silently fail.

Fix: fallback to parsing from row.bus field ('CAN 1'/'Lin 0') when
row.channel cannot be resolved to a valid cache key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant