MMU: Add workaround for broken Tune button #4681
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.
If the MMU is processing a command, the Tune button can't be executed and will put the printer into an unrecoverable state.
Mitigate the issue by ignoring the Tune button if the MMU is processing a command. In 99.9% of cases this will only happen when printing. The Tune button is still useful for the particular use case scenario it was added into the firmware in the first place, which is to allow the user to tune the idler stallguard threshold immediately after the printer boots up.
Fixes #4558
For anyone interested, a proper fix may look like this: #4561 but for now it is better to at least mitigate the issue instead of leaving it open in the firmware.
Steps to reproduce a problem:
Change in memory:
Flash: +16 bytes
SRAM: 0 bytes