-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Fix host_action_notify calls passing SRAM pointers #17953
Fix host_action_notify calls passing SRAM pointers #17953
Conversation
Adds a separate host_action_notify_P specifically made for PROGMEM strings.
Careful, because not all |
Thanks, it all looks good! |
This PR breaks compilation if |
This is caused by the include change from It's causing an error in dependencies because The include change should be reverted as well as the PGM_P references (or PGM_P should be defined). |
The current
host_action_notify
function expects a PROGMEM pointer but it is passed an SRAM one in some cases (byMarlinUI::set_status
for example), resulting in garbled data being printed on the serial interface. This behaviour can be observed by simply calling M117 with any string.This PR adds a new
host_action_notify_P
function specifically taking a PROGMEM pointers and changeshost_action_notify
to take an SRAM pointer.Calls to
host_action_notify
were updated to use the correct function.Some variable types were also changed to use the
PGM_P
define.