mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-24 00:28:34 -07:00
heater_pc: test template on connect
This allows us to handle template errors early and show the user visible error output in web ui Instead of crashing within the reactor. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
936023b573
commit
bbfffa7e6f
1 changed files with 2 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ class HeaterPredictControl:
|
|||
output = self.output
|
||||
return output
|
||||
heater.set_pc_callback(callback)
|
||||
# Test template
|
||||
self._render(.0)
|
||||
def _render(self, eventtime):
|
||||
context = self.create_context()
|
||||
output = self.template.render(context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue