mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 07:04:01 -06:00
gcode: Remove "action_" commands from get_status() calls
Rename printer.gcode.action_emergency_stop() to action_emergency_stop(), printer.gcode.action_respond_info() to action_respond_info(), and printer.gcode.action_respond_error() to action_raise_error() in command templates. This simplifies the get_status() interface, as returning callable functions from that interface was confusing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
2caaaea9a4
commit
b2c78d71b0
10 changed files with 67 additions and 61 deletions
|
@ -76,13 +76,13 @@ gcode:
|
|||
{% if printer.gcode.gcode_position.x != 0.0 %}
|
||||
M112
|
||||
{% else %}
|
||||
{ printer.gcode.action_respond_info("TEST_expression") }
|
||||
{ action_respond_info("TEST_expression") }
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro TEST_variable]
|
||||
variable_t: 12.0
|
||||
gcode:
|
||||
{ printer.gcode.action_respond_info("TEST_variable") }
|
||||
{ action_respond_info("TEST_variable") }
|
||||
{% if t - 12.0 != printer.toolhead.position.y %}
|
||||
M112
|
||||
{% endif %}
|
||||
|
@ -94,14 +94,14 @@ gcode:
|
|||
|
||||
[gcode_macro TEST_variable_part2]
|
||||
gcode:
|
||||
{ printer.gcode.action_respond_info("TEST_variable_part2") }
|
||||
{ action_respond_info("TEST_variable_part2") }
|
||||
{% if printer["gcode_macro TEST_variable"].t != 17.0 %}
|
||||
M112
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro TEST_param]
|
||||
gcode:
|
||||
{ printer.gcode.action_respond_info("TEST_param") }
|
||||
{ action_respond_info("TEST_param") }
|
||||
{% if params.T != "123" %}
|
||||
M112
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue