fix: resolve signal decoding in detail panel for BLF/ASC drag-drop trace#372
Open
lixiaoxie wants to merge 1 commit into
Open
fix: resolve signal decoding in detail panel for BLF/ASC drag-drop trace#372lixiaoxie wants to merge 1 commit into
lixiaoxie wants to merge 1 commit into
Conversation
Collaborator
Author
概述修复拖拽 BLF/ASC 文件加载后,点击 Trace 条目时 Detail 面板信号不解析的问题。 根因
修复方式当 堆叠 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.
457a3d1 to
d7a637a
Compare
fbef944 to
a43457d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix signal decoding failure when clicking trace rows after loading BLF/ASC files via drag-and-drop.
Root cause:
row.channelcontains 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.busfield ('CAN 1'/'Lin 0') whenrow.channelcannot be resolved to a valid cache key. Applied to both CAN and LIN decode paths.Stack: 4/4 — depends on #371