Skip to content

Conversation

@rondlh
Copy link

@rondlh rondlh commented Oct 13, 2025

Convert command queue from static to dynamic

Requirements

Any TFT touchscreen

Description & Benefits

The commands received by the TFT are stored in an internal command queue for further processing. If the command queue is full and a new command arrives then the dreaded "Busy processing" message pops up. The current command queue implementation is a static buffer of 20 command of 100 bytes each (2000 bytes command buffer). This is kind of wasteful as most gcode commands are only a few bytes long and movement commands are typically below 40 bytes long.
This PR changes this by making the command buffer dynamic, a command is stored in the dynamic buffer in a FIFO way and uses only the space in the buffer that is actually needed to store the command (+ terminating 0). This allows for roughly 3 times more commands in the same buffer size, and the "busy processing" message becomes a thing of the past.

Related Issues

Convert command queue from static to dynamic
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