We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4183de commit 7552872Copy full SHA for 7552872
extended_macro/example/example.py
@@ -0,0 +1,2 @@
1
+def repeat_back(rept):
2
+ return rept + ' ' + rept
extended_macro/example/function_config.yaml
@@ -0,0 +1,4 @@
+functions:
+ repeater: # The name which will be used in the GCode to call the function. Must be unique.
3
+ path: /home/pi/klipper_functions/example.py # Location of Python script. Must be an absolute path
4
+ function: repeat_back # The actual name of the Python function
extended_macro/example/klipper_functions.cfg
@@ -0,0 +1,8 @@
+# Extended_template is used to define the path to your Function Config
+[extended_template]
+path: /home/pi/klipper_functions/function_config.yaml
+
5
+[extended_macro REPEAT_MSG]
6
+gcode:
7
+ {% set rpt = params.MSG %}
8
+ M118 {repeater(rpt)}
0 commit comments