diff options
author | Alex Zellner <37265689+zellneralex@users.noreply.github.com> | 2021-05-11 19:17:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 13:17:22 -0400 |
commit | 60352f4b67b5e215b7aba196295bd23e0109b163 (patch) | |
tree | 209f3d7e09a3ee968e3b921c368955aed0d3c687 | |
parent | dc71b64c0aa2737912fdca8d26a6a416a06e319f (diff) | |
download | kutter-60352f4b67b5e215b7aba196295bd23e0109b163.tar.gz kutter-60352f4b67b5e215b7aba196295bd23e0109b163.tar.xz kutter-60352f4b67b5e215b7aba196295bd23e0109b163.zip |
filament_motion_sensor: add get_status (#4281)
Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
-rw-r--r-- | docs/Status_Reference.md | 9 | ||||
-rw-r--r-- | klippy/extras/filament_motion_sensor.py | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/Status_Reference.md b/docs/Status_Reference.md index dcb957f3..169394f3 100644 --- a/docs/Status_Reference.md +++ b/docs/Status_Reference.md @@ -55,6 +55,15 @@ objects: - `filament_detected`: Returns True if the sensor is in a triggered state. +# filament_motion_sensor + +The following information is available in +[filament_motion_sensor some_name](Config_Reference.md#filament_motion_sensor) +objects: +- `enabled`: Returns True if the motion sensor is currently enabled. +- `filament_detected`: Returns True if the sensor is in a triggered + state. + # firmware_retraction The following information is available in the diff --git a/klippy/extras/filament_motion_sensor.py b/klippy/extras/filament_motion_sensor.py index a3efa436..fb886aa5 100644 --- a/klippy/extras/filament_motion_sensor.py +++ b/klippy/extras/filament_motion_sensor.py @@ -22,6 +22,7 @@ class EncoderSensor: # Get printer objects self.reactor = self.printer.get_reactor() self.runout_helper = filament_switch_sensor.RunoutHelper(config) + self.get_status = self.runout_helper.get_status self.extruder = None self.estimated_print_time = None # Initialise internal state |