screen/panels: add action to process update

This commit is contained in:
Jordan Ruthe
2020-11-28 13:52:03 -05:00
parent 1c0e4fbf86
commit 728f9cfa0f
10 changed files with 34 additions and 12 deletions

View File

@@ -126,9 +126,12 @@ class FineTunePanel(ScreenPanel):
self.panel = grid
self._screen.add_subscription(panel_name)
def process_update(self, data):
def process_update(self, action, data):
_ = self.lang.gettext
if action != "notify_status_update":
return
if "gcode_move" in data:
if "homing_origin" in data["gcode_move"]:
self.labels['zoffset'].set_text(_("Z Offset") + ": %.2fmm" % data["gcode_move"]["homing_origin"][2])