diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-11-24 19:02:49 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-11-24 20:21:13 -0500 |
commit | 282af0220e2622fbba304f66f001f442b9f3ca8d (patch) | |
tree | bea8ee743fb3a848bf57796d48f3255e9e5ca525 /klippy | |
parent | 982567a69a8b3a03306deb5bbf0d03d36b998737 (diff) | |
download | kutter-282af0220e2622fbba304f66f001f442b9f3ca8d.tar.gz kutter-282af0220e2622fbba304f66f001f442b9f3ca8d.tar.xz kutter-282af0220e2622fbba304f66f001f442b9f3ca8d.zip |
toolhead: Report the current extruder from the get_status() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r-- | klippy/kinematics/extruder.py | 4 | ||||
-rw-r--r-- | klippy/toolhead.py | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py index 611e99ad..e5883df2 100644 --- a/klippy/kinematics/extruder.py +++ b/klippy/kinematics/extruder.py @@ -93,6 +93,8 @@ class PrinterExtruder: return dict(self.get_heater().get_status(eventtime), pressure_advance=self.pressure_advance, smooth_time=self.pressure_advance_smooth_time) + def get_name(self): + return self.name def get_heater(self): return self.heater def set_active(self, print_time, is_active): @@ -181,6 +183,8 @@ class DummyExtruder: move.end_pos, "Extrude when no extruder present") def calc_junction(self, prev_move, move): return move.max_cruise_v2 + def get_name(self): + return "" def get_heater(self): raise homing.CommandError("Extruder not configured") diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 7f1731f9..55f1bb36 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -484,6 +484,7 @@ class ToolHead: status = "Ready" return { 'status': status, 'print_time': print_time, 'estimated_print_time': estimated_print_time, + 'extruder': self.extruder.get_name(), 'position': homing.Coord(*self.commanded_pos), 'printing_time': print_time - last_print_start_time } def _handle_shutdown(self): |