mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -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
|
@ -66,9 +66,8 @@ class DisplayGroup:
|
|||
template = gcode_macro.load_template(c, 'text')
|
||||
self.data_items.append((row, col, template))
|
||||
def show(self, display, templates, eventtime):
|
||||
swrap = self.data_items[0][2].create_status_wrapper(eventtime)
|
||||
context = { 'printer': swrap,
|
||||
'draw_progress_bar': display.draw_progress_bar }
|
||||
context = self.data_items[0][2].create_template_context(eventtime)
|
||||
context['draw_progress_bar'] = display.draw_progress_bar
|
||||
def render(name, **kwargs):
|
||||
return templates[name].render(context, **kwargs)
|
||||
context['render'] = render
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue