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

@ -52,11 +52,11 @@ class HomingOverride:
homing_axes.append(axis)
toolhead.set_position(pos, homing_axes=homing_axes)
# Perform homing
kwparams = { 'printer': self.template.create_status_wrapper() }
kwparams['params'] = gcmd.get_command_parameters()
context = self.template.create_template_context()
context['params'] = gcmd.get_command_parameters()
try:
self.in_script = True
self.template.run_gcode_from_command(kwparams)
self.template.run_gcode_from_command(context)
finally:
self.in_script = False