Skip to content

added multi-line for macros#456

Open
jcarletto27 wants to merge 1 commit into
luc-github:3.1from
jcarletto27:3.1
Open

added multi-line for macros#456
jcarletto27 wants to merge 1 commit into
luc-github:3.1from
jcarletto27:3.1

Conversation

@jcarletto27

Copy link
Copy Markdown

Add multi-line G-code support for macros

This change allows G-code entered in the Macros module to span multiple lines, making longer macros easier to read and maintain.

Changes

  • Replaces the single-line macro G-code field with a multiline textarea.
  • Updates CMD macro execution to process each non-empty line as an individual command.
  • Supports LF and Windows CRLF line endings.
  • Preserves compatibility with existing semicolon-separated single-line macros.
  • Ignores blank lines during execution.

This makes it possible to write macros such as:

G90
G0 X0 Y0
M3 S1000

or

G90;G0 X0 Y0;M3 S1000

@luc-github

Copy link
Copy Markdown
Owner

Thank you, I understand the idea but the implementation is not ideal currently :

1 - macros cover several type, gcode but also filename and 8 lines for a file name is not really needed ,and confusing, it should be limited to gcode type only not all macros types.
2 - facilitating the usage of macro on FS over SD is not good idea, the webui do not stream gcode, (even ESP3D do not do it yet) so facilitating usage of too many commands in Macro over using a proper file may results unexpected error if target system got error in commands or is ignoring commandes.

if the point 2 can be anyway acceptable because it user responsability to fill the content - I consider the point 1 need to be fixed for merging for proper user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants