feat(serial): RS-485 hardware auto-RTS in the mapping form (v2.6.3)#23
Merged
Conversation
The engine already applied RS-485 via pyserial rs485_mode (serial_io.py), but the settings were only reachable through JSON import / the REST API. Expose them in the UI: - _mapping_form.html: a collapsible "RS-485 (half-duplex, hardware auto-RTS)" section per serial port — enable + RTS pre/post-TX delays (ms) + RTS-high-during-TX. Pure HTML <details> (CSP-safe, no inline JS). - routes _serial_dict: parse the RS-485 fields into serial.advanced. - _preserve_unmanaged_fields: the form now OWNS the RS-485 fields, so stop copying the whole `advanced` block over on edit — only carry the two it doesn't expose (hangup_when_done, nobreak). Updated test_preserve_unmanaged_fields_on_edit to match. - README (TR/EN): RS-485 is a UI feature now; ROADMAP: shipped (removed from v2.7). - Screenshots regenerated (add-mapping form shows the RS-485 section). Version 2.6.3.
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.
Closes the docs gap flagged in the v2.6.2 review: RS-485 was a working but UI-less feature. The engine already applied it (
serial_io.py→ pyserialrs485_modewithRS485Settings), but the fields were only reachable via JSON import / the REST API.What
_mapping_form.html): a collapsible RS-485 (half-duplex, hardware auto-RTS) section on each serial port — Enable, RTS delay before TX (ms), RTS delay after TX (ms), RTS high during TX. Pure HTML<details>(CSP-safe, no inline JS; auto-opens when RS-485 is already enabled).routes._serial_dict): the RS-485 fields parse intoserial.advanced._preserve_unmanaged_fieldsno longer copies the wholeadvancedblock on edit — it carries over only the two the form doesn't expose (hangup_when_done,nobreak).test_preserve_unmanaged_fields_on_editupdated to assert the new semantics.Notes
TIOCSRS485feature; the driver must support it (documented in the form hint).Verification
--version→ 2.6.3 · ruff clean · 33/33 tests pass. README (TR/EN) + ROADMAP updated (shipped, removed from v2.7); add-mapping screenshot regenerated.