aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArksine <arksine.code@gmail.com>2020-08-01 11:22:26 -0400
committerKevinOConnor <kevin@koconnor.net>2020-08-01 15:56:51 -0400
commitd37374974d9785d1ace4a8f61e51fa910cffcb49 (patch)
treec16a2f7411b6bbba95ea8424349b906bebb73ea4
parentc22d5b2444122794d0092622f6342724a009ca51 (diff)
downloadkutter-d37374974d9785d1ace4a8f61e51fa910cffcb49.tar.gz
kutter-d37374974d9785d1ace4a8f61e51fa910cffcb49.tar.xz
kutter-d37374974d9785d1ace4a8f61e51fa910cffcb49.zip
filament_switch_sensor: report "enabled" state via get_status
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
-rw-r--r--klippy/extras/filament_switch_sensor.py4
1 files changed, 3 insertions, 1 deletions
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: