diff options
author | Arksine <arksine.code@gmail.com> | 2020-08-01 11:22:26 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2020-08-01 15:56:51 -0400 |
commit | d37374974d9785d1ace4a8f61e51fa910cffcb49 (patch) | |
tree | c16a2f7411b6bbba95ea8424349b906bebb73ea4 /klippy/extras/filament_switch_sensor.py | |
parent | c22d5b2444122794d0092622f6342724a009ca51 (diff) | |
download | kutter-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>
Diffstat (limited to 'klippy/extras/filament_switch_sensor.py')
-rw-r--r-- | klippy/extras/filament_switch_sensor.py | 4 |
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: |