From 9f4204b8989aff2afe06b4b288c51c7aa516279c Mon Sep 17 00:00:00 2001 From: Jordan Ruthe Date: Wed, 9 Dec 2020 13:25:01 -0500 Subject: [PATCH] job_status: update Z value to gcode value --- docs/changelog.md | 3 +++ panels/job_status.py | 4 +++- screen.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index c26376d5..0006c312 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,8 @@ ## Changelog +#### 2020 12 09 +* Z value in job status now reflects the gcode Z value. This allows people with ABL to have a better understanding of Z + #### 2020 12 08 * Screen Width/Height are now definable in the configuration file * Changed job page to allow for more information, display thumbnail of STL diff --git a/panels/job_status.py b/panels/job_status.py index c7efdc23..a744cb4d 100644 --- a/panels/job_status.py +++ b/panels/job_status.py @@ -350,7 +350,9 @@ class JobStatusPanel(ScreenPanel): if "toolhead" in data and "position" in data["toolhead"]: self.labels['pos_x'].set_text("X: %.2f" % (data["toolhead"]["position"][0])) self.labels['pos_y'].set_text("Y: %.2f" % (data["toolhead"]["position"][1])) - self.labels['pos_z'].set_text("Z: %.2f" % (data["toolhead"]["position"][2])) + if "gcode_move" in data and "gcode_position" in data["gcode_move"]: + self.labels['pos_z'].set_text("Z: %.2f" % (data["gcode_move"]["gcode_position"][2])) + if "gcode_move" in data: #if "homing_origin" in data["gcode_move"]: # self.labels['zoffset'].set_text("%.2fmm" % data["gcode_move"]["homing_origin"][2]) diff --git a/screen.py b/screen.py index a5435dfe..cb5a4233 100644 --- a/screen.py +++ b/screen.py @@ -119,7 +119,7 @@ class KlipperScreen(Gtk.Window): "configfile": ["config"], "extruder": ["target","temperature","pressure_advance","smooth_time"], "fan": ["speed"], - "gcode_move": ["homing_origin","extrude_factor","speed_factor"], + "gcode_move": ["extrude_factor","gcode_position","homing_origin","speed_factor"], "heater_bed": ["target","temperature"], "pause_resume": ["is_paused"], "print_stats": ["print_duration","total_duration","filament_used","filename","state","message"],