aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/heaters.py
diff options
context:
space:
mode:
authorStefan Dej <meteyou@gmail.com>2020-12-14 02:08:16 +0100
committerGitHub <noreply@github.com>2020-12-13 20:08:16 -0500
commit77add9567555f395eac7b12df96fb830fe08d46c (patch)
treeebc758341b5a06bdfae678370cdc735dfebd928d /klippy/extras/heaters.py
parent43a6d18f13995a2c8990bec5fc8ff05f6b280b2c (diff)
downloadkutter-77add9567555f395eac7b12df96fb830fe08d46c.tar.gz
kutter-77add9567555f395eac7b12df96fb830fe08d46c.tar.xz
kutter-77add9567555f395eac7b12df96fb830fe08d46c.zip
heaters: add last pwm value to heater.get_status (#3621)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Diffstat (limited to 'klippy/extras/heaters.py')
-rw-r--r--klippy/extras/heaters.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/extras/heaters.py b/klippy/extras/heaters.py
index 7dca5fd4..cd426f30 100644
--- a/klippy/extras/heaters.py
+++ b/klippy/extras/heaters.py
@@ -135,7 +135,9 @@ class Heater:
with self.lock:
target_temp = self.target_temp
smoothed_temp = self.smoothed_temp
- return {'temperature': smoothed_temp, 'target': target_temp}
+ last_pwm_value = self.last_pwm_value
+ return {'temperature': smoothed_temp, 'target': target_temp,
+ 'power': last_pwm_value}
cmd_SET_HEATER_TEMPERATURE_help = "Sets a heater temperature"
def cmd_SET_HEATER_TEMPERATURE(self, gcmd):
temp = gcmd.get_float('TARGET', 0.)