aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralchemyEngine <robertp@norbital.com>2022-09-29 19:44:04 +0100
committerKevinOConnor <kevin@koconnor.net>2022-09-30 11:19:01 -0400
commita2482d4f952e0ffd908e4381cae9e45ab1148773 (patch)
tree7ebdd731b1b6f5e3b5f670b33ac5eb80e498e7b5
parent6288da13acb4022897ca2fcf33278cd0e3dabb41 (diff)
downloadkutter-a2482d4f952e0ffd908e4381cae9e45ab1148773.tar.gz
kutter-a2482d4f952e0ffd908e4381cae9e45ab1148773.tar.xz
kutter-a2482d4f952e0ffd908e4381cae9e45ab1148773.zip
z_thermal_adjust: get_temp hotfix
M105 expects get_temp method. Module crashes when gcode_id parameter is set and M105 called. Add methods as hotfix. Signed-off-by: Robert Pazdzior <robertp@norbital.com>
-rw-r--r--klippy/extras/z_thermal_adjust.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/klippy/extras/z_thermal_adjust.py b/klippy/extras/z_thermal_adjust.py
index 96e2dba7..0fa0bff0 100644
--- a/klippy/extras/z_thermal_adjust.py
+++ b/klippy/extras/z_thermal_adjust.py
@@ -145,6 +145,12 @@ class ZThermalAdjuster:
self.measured_min = min(self.measured_min, self.smoothed_temp)
self.measured_max = max(self.measured_max, self.smoothed_temp)
+ def get_temp(self, eventtime):
+ return self.smoothed_temp, 0.
+
+ def stats(self, eventtime):
+ return False, '%s: temp=%.1f' % ("z_thermal_adjust", self.smoothed_temp)
+
def cmd_SET_Z_THERMAL_ADJUST(self, gcmd):
enable = gcmd.get_int('ENABLE', None, minval=0, maxval=1)
coeff = gcmd.get_float('TEMP_COEFF', None, minval=-1, maxval=1)