Skip to content

fix: Don't update printer displays from uploaded lines - #1576

Open
ellensp wants to merge 1 commit into
kliment:masterfrom
ellensp:no-graph-updates-during-upload
Open

ellensp wants to merge 1 commit into
kliment:masterfrom
ellensp:no-graph-updates-during-upload

Conversation

@ellensp

@ellensp ellensp commented Nov 4, 2026

Copy link
Copy Markdown

Description

While a file uploads to SD, Pronterface's sentcb treats each sent line as if the printer were running it. Lines being uploaded are only stored on the card, but each M106 or M107 changes the fan on the temperature graph. M104, M109, M140, M190 and T lines go through the same code, for the targets and the tool selector.

This PR skips those updates while self.uploading is set. Commands sent outside an upload update the displays as before.

Testing

Tested on an MKS TinyBee running Marlin bugfix-2.1.x at 250000 baud, uploading the first 9000 lines of a PrusaSlicer file, which include 84 M106 and M107 lines, through Pronterface's own upload path:

master This PR
Fan graph updates during the upload 84 None
Graph updates from M106 S128 then M107 after the upload 128, then 0 128, then 0
Upload time 60.1 s 58.3 s
File size on the card 270560 bytes 270560 bytes

Calling sentcb directly with M104 and M140 lines also updates the graph targets normally, and doesn't while uploading. All tests in tests/ pass.

AI disclosure

Full disclosure: I don't know your policy on AI, so please treat this PR accordingly.

AI used: Claude Opus 5.5 (Anthropic), via Claude Code. It wrote the code and this description, and ran the tests above on @ellensp's board. @ellensp found the problem, directed the work and verified the result.

Lines uploaded to SD are stored, not run, but Pronterface treated them as
if the printer were running them. Each M106 or M107 changed the fan on the
temperature graph, and M104, M109, M140, M190 and T lines would change the
targets and the tool selector in the same way.

Skip these updates while uploading.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant