mirror of https://github.com/Desuuuu/klipper.git
Fix macro context creation
This commit is contained in:
parent
98fbeb96c9
commit
41d9d00cfd
|
@ -74,9 +74,8 @@ class T5UID1_Routine:
|
|||
self.reactor.update_timer(self._timer, self.reactor.NOW)
|
||||
return
|
||||
|
||||
swrap = self._template.create_status_wrapper()
|
||||
context = { 'printer': swrap,
|
||||
'is_timer': is_timer }
|
||||
context = self._template.create_template_context()
|
||||
context['is_timer'] = is_timer
|
||||
context.update(self._context)
|
||||
|
||||
result = self._template.render(context).strip()
|
||||
|
|
|
@ -85,8 +85,7 @@ class T5UID1_Var:
|
|||
if self.type != "input":
|
||||
raise Exception("not an input")
|
||||
|
||||
swrap = self._template.create_status_wrapper()
|
||||
context = { 'printer': swrap }
|
||||
context = self._template.create_template_context()
|
||||
context.update(self._context)
|
||||
|
||||
if self.data_type != "none" and self.data_len != 0:
|
||||
|
@ -118,8 +117,7 @@ class T5UID1_Var:
|
|||
if self.type != "output":
|
||||
raise Exception("not an output")
|
||||
|
||||
swrap = self._template.create_status_wrapper()
|
||||
context = { 'printer': swrap }
|
||||
context = self._template.create_template_context()
|
||||
context.update(self._context)
|
||||
result = self._template.render(context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue