🐛 Don't apply settings during validation #26935
Merged
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.
Description
Several settings were being applied during the validation stage. In most cases this is benign, as it will be replaced in a subsequent step.
In the case of BACKLASH_COMPENSATION, the initial configuration with invalid data caused corruption of the Backlash::residual_error member. Do to the behavior of the backlash compensation mechanisms, this persists even beyond the loading or resetting of proper values, leading to undefined printer behavior and often physical crashes.
After identifying that issue the settings file was reviewed for other similar issues that needed to be fixed.
Requirements
For the most drastic results, enable BACKLASH_COMPENSATION with BACKLASH_CORRECTION set to zero. On firmware boot this will often result in an overflowed residual_error member, resulting in doubled movements in one direction of one or more axis. The Z axis is where this is most often seen, since steps/mm is much higher on this axis.
Benefits
Don't crash your printhead.
Configurations
N/A
Related Issues
N/A