MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.27k stars 19.23k forks source link

Wrong behavior of STRINGIFY macro in Bltouch commands menu #13462

Closed AndreaMZ closed 5 years ago

AndreaMZ commented 5 years ago

Hi, i have compiled Marlin 2 , commit hash 144018736aa1e0d466e0c0693cf7992190e4981f dated 18/03/2019 - branch bugfix-2.0.x Compiled with GCC 8.2.0 emitting AVR binary code.

in module menu_configuration.cpp there are BlTouch commands like this MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET))); The gcode string obtained is wrong , the second STRINGIFY expands to "BLTOUCH_RESET" instead of "160" so the string sent to command interpreter is "M280 P0 SBLTOUCH_RESET" instead of the correct "M280 P0 S160"

I have temporary fixed the line as: MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S160" ));

best regards amz

InsanityAutomation commented 5 years ago

A pull request is already open with code to resolve this.

InsanityAutomation commented 5 years ago

FYI this is fixed upstream, please verify and close this issue.

AndreaMZ commented 5 years ago

ok

AndreaMZ commented 5 years ago

Further tests done : ok. bug closed thank you for feedback

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.