Repository navigation
Persist the soft-limits toggle and describe limits as origin distances - #624
Conversation
Machine.to_dict() serialized soft_limits but never soft_limits_enabled, and from_dict() fell back to the freshly-constructed default (True) when the key was missing. Disabling the toggle therefore did not survive a restart: soft limits came back enabled with the configured bounds gone (disabling clears them), and jogging was checked against the full axis extents again. Serialize the flag next to the bounds. The device-profile path already round-trips it correctly (stored as None when enabled, False when disabled), and from_dict() has always read the key - only the write side was missing. Covered by a round-trip regression test.
The min/max rows were titled "X Min"/"X Max" with subtitles like "Minimum X coordinate", which reads as a machine coordinate. The values are distances measured from the origin corner into the bed; they are fixed to the physical bed and independent of the active WCS. Retitle the rows to "X Min Distance from Origin" and friends, replace the subtitles with that explanation, and apply the same wording in the machine wizard. Update the website hardware docs (English, German, French), which listed the old field names; the soft-limit rows are below the fold of the hardware screenshot, so no screenshot target changes.
…ages The es, hi, pt-BR, uk, and zh-CN hardware pages still listed the old "X/Y Min"/"X/Y Max" field names after the label rewording; they were missed because the labels are translated and did not match the English grep. Bring all five in line with the reworded English source.
🤖 Estimated LLM implementation costReplayed each of the 3 commits in this pull request and counted the code lines each commit added or rewrote:
Added lines by language: Python 61, Markdown 20 Full estimate
Cost model: ≈10 tokens per code line at $15/Mtok output and $3/Mtok input (assuming heavy prompt caching); input ≈ 15× output for conversation replay; a review round ≈ 42,000 tokens; a failed CI run ≈ 21,000 tokens; file reads capped at 20 kB each. Active window from first commit to merge: <1 day.
|
Fixes two problems in the hardware settings' Soft Limits group (one behavioral, one wording) and the matching website docs.
What does this PR change?
Disabling "Enable Soft Limits" did not survive a restart.
Machine.to_dict()serializedsoft_limitsbut neversoft_limits_enabled, whilefrom_dict()reads that key with the freshly-constructed default as fallback - which isTrue. So after every restart the toggle flipped itself back on, with the configured bounds gone (disabling clears them viaclear_soft_limits()), and jogging was silently checked against the full axis extents again. The flag is now serialized next to the bounds; the read side and the device-profile path (stored asNonewhen enabled,Falsewhen disabled) already handled it correctly, only the write side was missing. A round-trip regression test covers it.The min/max rows read like machine coordinates. They were titled "X Min"/"X Max" with subtitles like "Minimum X coordinate", but the values are distances measured from the origin corner into the bed - fixed to the physical bed, independent of the active WCS. The rows are now titled "X Min Distance from Origin" and friends, with the helper text "Distance from the origin corner into the bed (not a coordinate). Fixed to the physical bed, independent of the WCS." as subtitle, in both the device settings hardware page and the machine wizard.
Docs: the website hardware page listed the old field names; the bullets are reworded in the English source and in every translation carrying the section (de, es, fr, hi, pt-BR, uk, zh-CN), each using that page's existing terminology. The soft-limit rows sit below the fold of the hardware screenshot, so no screenshot target changed.
Testing:
tests/machine/models/test_machine_model.py(incl. the newtest_soft_limits_enabled_persists_through_serialization), the neighboring machine/profile suites, andpixi run lintall pass; website markdown formatted withpixi run site-format.