Skip to content

feat(la): multi-protocol AutoDetectResult[] for static detection#18

Open
vailuc wants to merge 1 commit into
mainfrom
feat/la-multiprotocol-autodetect
Open

feat(la): multi-protocol AutoDetectResult[] for static detection#18
vailuc wants to merge 1 commit into
mainfrom
feat/la-multiprotocol-autodetect

Conversation

@vailuc

@vailuc vailuc commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add autoDetectLaProtocolMulti() — groups channels via union-find, runs per-group targeted decode, returns sorted AutoDetectResult[]
  • Extract groupChannelsByLinks() to laDecoders.ts (shared with IncrementalClassifier)
  • Refactor autoDetectLaProtocol() to delegate to multi (backward compatible — returns results[0])
  • Update LaDecodersPanel to show all detected protocols as clickable chips
  • Add 5 unit tests for multi-protocol detection

Test plan

  • npx tsc --noEmit clean
  • npx vitest run — 206 passed (5 new)
  • npm run build clean
  • ./scripts/check_pii.sh clean
  • autoDetectLaProtocol backward compat verified (same top result as multi[0])
  • Real multi-protocol capture test (pending ESP32 + Hantek rig)

Related

@vailuc vailuc force-pushed the feat/la-multiprotocol-autodetect branch 2 times, most recently from bc9124a to c090c5e Compare July 8, 2026 08:27
…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.
@vailuc vailuc force-pushed the feat/la-multiprotocol-autodetect branch from c090c5e to 7dd20cf Compare July 8, 2026 08:36
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