Klipper Macro Params Value Issue
Hello,
I encountered a problem with a macro that I am using. I simply want to call a macro and feed it the current extruder temperature. The macro is defined as follows:
TOOL_PICKUP is another macro which is called and the parameters that follow are needed inside that macro. But I want to focus on the the macro above. When I call the macro like so:
T0 EXTRUDER_TEMP=235
, it actually sets the GCODE Variable temp
to "0" . If I define it to be a "float" instead of an "int". It sets it to "0.0"
Does anyone have an idea why ? By the way, if I call the macro like so: T0
, it sets the variable temp
to "230".
Any help greatly appreciated ✌️1 Reply
deep-jadeOP•2y ago
solved
For everyone interested:
A GCode Macro, which is named with a single letter followed by a number (e.g.: T0, K1, P5, B9) and is fed with a parameter, there must not be an equal sign between the parameter's name and the value, when the macro is called followed by the parameter. So in my example above:
T0 EXTRUDER_TEMP=235 WRONG
T0 EXTRUDER_TEMP235 CORRECT
Whereas, if the macro's name was for example
Test_Macro
:
Test_Macro EXTRUDER_TEMP=235 CORRECT
Test_Macro EXTRUDER_TEMP235 WRONG