Add WebSerial support and align SLCAN parsing behavior#387
Open
maksimdrachov wants to merge 14 commits into
Open
Add WebSerial support and align SLCAN parsing behavior#387maksimdrachov wants to merge 14 commits into
maksimdrachov wants to merge 14 commits into
Conversation
pavel-kirienko
requested changes
Jun 16, 2026
pavel-kirienko
left a comment
Member
There was a problem hiding this comment.
@copilot address my comments
Member
|
@copilot address my comments above |
Contributor
Addressed in commit |
Copilot
AI
changed the title
Add support for WebSerial
Add WebSerial support and align SLCAN parsing behavior
Jun 16, 2026
pavel-kirienko
requested changes
Jun 16, 2026
pavel-kirienko
left a comment
Member
There was a problem hiding this comment.
@maksimdrachov The webserial driver needs to set up the SLCAN channel during initialization with the specified CAN bitrate. To initialize the channel we need to send C (to close) and then O (to reopen). See how it's done in https://github.com/dronecan/pydronecan/blob/master/dronecan/driver/slcan.py
Member
Author
|
Let me know if this is too sloppy, I'm not sure if I should feel bad for commiting 100% AI-written code. |
1fabc30 to
3ba5be0
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.
Adds browser-oriented WebSerial support for CAN-over-SLCAN and incorporates reviewer-requested protocol adjustments.
Implemented updates include:
Protocolwith an explicitABCfor the async serial port contract inwebserial.py.WebSerialSLCANInterface.filter()a no-op (no software filtering where no hardware filtering exists).WebSerialSLCANInterface.__repr__()formatting as requested.src/pycyphal2/can/__init__.py._slcan.pyparser behavior to remain compatible with the requested pydronecan superset expectations, including accepted frame forms and permissive timestamp-tail handling, while preserving robust malformed-input dropping semantics.