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:
Kevin O'Connor 2020-08-16 15:39:30 -04:00
parent 2caaaea9a4
commit b2c78d71b0
10 changed files with 67 additions and 61 deletions

View file

@ -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 %}