Use lightweight READ_STATUS instead of full CONFIG_READ for profile polling #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/live-sync-led-stutter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Live-Sync polls read_active_profile() every 1.5s, but it requested a full 740-byte config dump (~124 chunk packets) just to read one byte out of it. The firmware handles CONFIG_READ synchronously and blocking (poll_vendor() runs before updateLEDs() in the same loop iteration), which delayed the LED animation update enough to make Pulse/Blink visibly stutter on every poll cycle.
read_active_profile() now sends VersaMCU's new CMD_READ_STATUS (0x06) and reads back a single EVT_STATUS (0x86) packet instead of driving the chunked dump protocol. Requires the corresponding firmware-side commit on VersaMCU ("Add lightweight READ_STATUS command to avoid blocking LED updates during polling"). Older firmware without it just times out gracefully.
Verified end-to-end against a freshly flashed board: correct profile returned, no more visible LED stutter with Live-Sync on.
Live-Sync polls read_active_profile() every 1.5s, but it was requesting a full 740-byte config dump (~124 chunk packets) just to read one byte out of it. The firmware handles CONFIG_READ synchronously and blocking, which delayed its LED animation update enough to make Pulse/Blink visibly stutter on every poll cycle -- see VersaMCU's doc/07_serial_protocol.md ("READ_STATUS vs. CONFIG_READ fuer Polling") for the root-cause writeup on the firmware side. read_active_profile() now sends VersaMCU's new CMD_READ_STATUS (0x06) and reads back a single EVT_STATUS (0x86) packet instead of driving the chunked dump protocol. Requires the corresponding firmware update (VersaMCU commit "Add lightweight READ_STATUS command..."); older firmware without it just times out gracefully (last_error stays "timeout", no crash). desktop_viewer.py's SERIAL_POLL_S/SERIAL_IDLE_S already sit back at their original 1.5s/3.0s (temporarily raised to 8s as a stopgap before the firmware fix landed) since the expensive dump is gone now. Verified end-to-end against a freshly flashed board: correct profile returned, no more visible LED stutter with Live-Sync on. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.