filament_motion_sensor: add get_status (#4281)

Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
This commit is contained in:
Alex Zellner 2021-05-11 19:17:22 +02:00 committed by GitHub
parent dc71b64c0a
commit 60352f4b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -55,6 +55,15 @@ objects:
- `filament_detected`: Returns True if the sensor is in a triggered - `filament_detected`: Returns True if the sensor is in a triggered
state. 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 # firmware_retraction
The following information is available in the The following information is available in the

View File

@ -22,6 +22,7 @@ class EncoderSensor:
# Get printer objects # Get printer objects
self.reactor = self.printer.get_reactor() self.reactor = self.printer.get_reactor()
self.runout_helper = filament_switch_sensor.RunoutHelper(config) self.runout_helper = filament_switch_sensor.RunoutHelper(config)
self.get_status = self.runout_helper.get_status
self.extruder = None self.extruder = None
self.estimated_print_time = None self.estimated_print_time = None
# Initialise internal state # Initialise internal state