Use lightweight READ_STATUS instead of full CONFIG_READ for profile polling #1

Open
Grovy311 wants to merge 0 commits from fix/live-sync-led-stutter into main
Collaborator

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 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.
Grovy311 added 1 commit 2026-08-07 15:51:58 +02:00
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>
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/live-sync-led-stutter:fix/live-sync-led-stutter
git checkout fix/live-sync-led-stutter

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.

git checkout main
git merge --no-ff fix/live-sync-led-stutter
git checkout fix/live-sync-led-stutter
git rebase main
git checkout main
git merge --ff-only fix/live-sync-led-stutter
git checkout fix/live-sync-led-stutter
git rebase main
git checkout main
git merge --no-ff fix/live-sync-led-stutter
git checkout main
git merge --squash fix/live-sync-led-stutter
git checkout main
git merge --ff-only fix/live-sync-led-stutter
git checkout main
git merge fix/live-sync-led-stutter
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jappel/VersaGUI-py#1
No description provided.