Fixes issue #21274 compile error with maple env. #22479
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
Ender 6 example configs give a build error when using env:STM32F103RET6_creality_maple
"Marlin\src\lcd\extui\dgus\DGUSScreenHandler.cpp:562:13: note: in expansion of macro 'sprintf_P'
sprintf_P(buf, PSTR("M303 E-1 C5 S70 U1"));"
The maple implementation of sprintf_P seems to expect a variable always.
So changed code to use a variable ie
sprintf_P(buf, PSTR("M303 E%d C5 S70 U1"),-1);Requirements
Ender 6 Configs, env:STM32F103RET6_creality_maple
Benefits
Now compiles on Env's
Configurations
https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x/config/examples/Creality/Ender-6
Related Issues
Issue #21274