From d37374974d9785d1ace4a8f61e51fa910cffcb49 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sat, 1 Aug 2020 11:22:26 -0400 Subject: [PATCH] filament_switch_sensor: report "enabled" state via get_status Signed-off-by: Eric Callahan --- klippy/extras/filament_switch_sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/klippy/extras/filament_switch_sensor.py b/klippy/extras/filament_switch_sensor.py index 78dee6f8..51d8ba4b 100644 --- a/klippy/extras/filament_switch_sensor.py +++ b/klippy/extras/filament_switch_sensor.py @@ -89,7 +89,9 @@ class RunoutHelper: (self.name, eventtime)) self.reactor.register_callback(self._runout_event_handler) def get_status(self, eventtime): - return {"filament_detected": bool(self.filament_present)} + return { + "filament_detected": bool(self.filament_present), + "enabled": bool(self.sensor_enabled)} cmd_QUERY_FILAMENT_SENSOR_help = "Query the status of the Filament Sensor" def cmd_QUERY_FILAMENT_SENSOR(self, gcmd): if self.filament_present: