-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added configurable delay for sending to mainboard + other #2970
Open
digant73
wants to merge
12
commits into
bigtreetech:master
Choose a base branch
from
digant73:bugfix_20250203
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let's leave this here for a while so that others can also test it before merging. @BTTJUSTIN Please add this to the weekly meeting for review when they resume. |
This was referenced Feb 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ironically speed improvements added to the TFT accentuated communication errors with some mainboards. This PR primarily adds some settings, logic and tools to setup a stable communication if possible (e.g. in case the issue is not due to EMI).
IMPROVEMENTS:
Added configurable delay for sending to mainboard: new setting
tx_delay
is available on bothconfig.ini
file andFeature
menu. It allows (in case the issue is not related to EMI) to fix theUnknown Command
error messages reported by users with some mainboards.Minimum delay (in ms) to apply between the last sent G-code and the next one to be sent to the mainboard.
Minimum delay for the next G-code to send depends on ADVANCED_OK feature status:
NOTE: Increase it in case:
missmatch (if COMMAND_CHECKSUM feature is enabled)) to the TFT during printing in particular
when the reported command is slightly misswritten at the beginning (e.g. "M14 E" instead of
"M114 E", "20" instead of "M220", "221" instead of "M221", "GX108.607 Y96.632 E0.02052"
instead of "G1 X108.607 Y96.632 E0.02052" etc.).
Typically, to avoid those error messages:
Added configurable prefetch option: new setting
tx_prefetch
is available on bothconfig.ini
file andFeature
menu. It allows to reduce latency at minimum whentx_delay
is also set to 0.Used/effective only when printing from TFT SD card / TFT USB disk.
The TFT prefetches from TFT SD card / TFT USB disk the next G-code to be sent to the mainboard
so it will be immediately ready to be sent to the mainboard (no extra latency to read, parse
and enqueue from TFT media) when the G-code is scheduled to be sent.
NOTE: Disable it in case:
missmatch (if COMMAND_CHECKSUM feature is enabled)) to the TFT during printing in particular
when the reported command is slightly misswritten at the beginning (e.g. "M14 E" instead of
"M114 E", "20" instead of "M220", "221" instead of "M221", "GX108.607 Y96.632 E0.02052"
instead of "G1 X108.607 Y96.632 E0.02052" etc.).
Added monitoring task for heaters waiting for target temperature. In case of issue on printer, after a timeout value of 5 minutes, a dialog message asking to wait for heating or to resume without waiting is prompted. That feature is also useful for troubleshooting
Added
Test
Monitoring menu onTuning
menu: It continuously (at maximum rate) send predefined gcodes to mainboard to stress the system and let stability issues emerge such asUnknown Command
error messages. It temporary enablescommand checksum
feature to intercept even corrupted but valid commands (otherwise not reported asUnknown Command
error messages). That menu is useful to test and find the minimum value fortx_delay
making the system stableCode optimization: Some code reviewed allowing to reduce about 100 bytes on flash. Some code made more robust avoiding any possibility of buffer overflow (and so a possible freeze)
Fix casting to (uint8_t *): Some changes on
language
,popup
andmenu
API allowing to remove that very excessive and useless need of casting to (uint8_t *) on text string (that useless casting was everywhere)Configured range values in
config.h
: All hard coded range values inconfig.c
are now configured inconfig.h
(as all the others already present there)Minor cleanup: Naming convention, order of declaration etc.
BUGFIXES:
KINEMATICS
was present then CAPEXTRUDER_COUNT
was not parsedlist item
menu not properly cleared etc.)PR STATE: ready for merge
should fix #2968
should fix #2962
should fix #2960
should fix #2950
should fix #2860