dw-0 / kiauh

Klipper Installation And Update Helper
GNU General Public License v3.0
3.4k stars 491 forks source link

Feature: Allow Gcode_Shell_Command to Return a value to the calling process #406

Closed ccatlett1984 closed 11 months ago

ccatlett1984 commented 11 months ago

Is your feature request related to a problem? Please describe

I'd like to be able to make an external call, to retrieve data and pass that back into my klipper macro.

My exact scenario, is making a rest call to moonraker, to pull the metadata values for the gcode file currently being printed, to prevent the need for adding multiple variables in the custom gcode section of the slicer, and prevent the need to reslice files to add additional params.

Describe the solution you'd like

Add a mechanism for the gcode_shell_command to return data

Describe alternatives you've considered

I don't see another way of doing this programmatically.

Additional information

No response