feat(la): multi-protocol AutoDetectResult[] for static detection#18
Open
vailuc wants to merge 1 commit into
Open
feat(la): multi-protocol AutoDetectResult[] for static detection#18vailuc wants to merge 1 commit into
vailuc wants to merge 1 commit into
Conversation
bc9124a to
c090c5e
Compare
…ication - Add autoDetectLaProtocolMulti() — groups channels via union-find, runs per-group targeted decode, returns sorted AutoDetectResult[] - Add classifyChannelRoles() — classifies each channel as clock, cs_enable, data_in, data_out, control, or async based on edge patterns - Use channel roles to narrow multi-channel protocol combinations: I2C on (clock, data) pairs, SPI on (clock + data + cs), SWD on (clock + control), JTAG on (clock + control + data_in + data_out) - Extract groupChannelsByLinks() to laDecoders.ts (shared with IncrementalClassifier) - Refactor autoDetectLaProtocol() to try labels first, then delegate to autoDetectLaProtocolMulti (backward compat) - Update LaDecodersPanel to show all detected protocols as clickable chips - Add tryAsyncProtocols() — scans every active channel for UART/CAN/ OneWire/Modbus/LIN independently of grouping - Add tryMultiChannelProtocols() — role-aware exhaustive scan for I2C/SPI/SWD/JTAG with fallback to all-pairs - Add 5 unit tests for multi-protocol detection - Fix operator precedence bug in buildGroupProfile 206 tests pass, tsc clean, build clean, PII clean.
c090c5e to
7dd20cf
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.
Summary
autoDetectLaProtocolMulti()— groups channels via union-find, runs per-group targeted decode, returns sortedAutoDetectResult[]groupChannelsByLinks()tolaDecoders.ts(shared withIncrementalClassifier)autoDetectLaProtocol()to delegate to multi (backward compatible — returnsresults[0])LaDecodersPanelto show all detected protocols as clickable chipsTest plan
npx tsc --noEmitcleannpx vitest run— 206 passed (5 new)npm run buildclean./scripts/check_pii.shcleanautoDetectLaProtocolbackward compat verified (same top result as multi[0])Related