Skip to content
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

I couldn't use the custom macros that i created with gcode_shell command in a gcode file #447

Closed
Dalinaffeti opened this issue Mar 6, 2024 · 1 comment

Comments

@Dalinaffeti
Copy link

Is your feature request related to a problem? Please describe

So i made a custom macro called SET_POWER, which sets the power for the laser. This macro calls a python script with the given parameter(POWER) for example POWER=75%. I manged to do all of that. Now what is missing me is to use it. I tought this will be called like this inside a gcode file: SET_POWER POWER=75.0. But i got nothing

Describe the solution you'd like

I want to konw how to use custom gcode macros that i created with gcode_shell_command

Describe alternatives you've considered

No response

Additional information

No response

@Dalinaffeti Dalinaffeti added the Type: Feature Request New feature or request label Mar 6, 2024
@Dalinaffeti
Copy link
Author

Dalinaffeti commented Mar 6, 2024

code for it:
[gcode_shell_command set_power]
command: sh /home/pi/printer_data/config/set_power.sh

[gcode_macro SET_POWER]
gcode:
{% set power = params.POWER %}
{ action_respond_info("%s" % (power)) }
RUN_SHELL_COMMAND CMD=set_power PARAMS={power}

@dw-0 dw-0 closed this as completed Mar 6, 2024
@dw-0 dw-0 added not kiauh and removed Type: Feature Request New feature or request labels Mar 6, 2024
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

No branches or pull requests

2 participants