diff --git a/docs/Status_Reference.md b/docs/Status_Reference.md index 778802a5..5557cadf 100644 --- a/docs/Status_Reference.md +++ b/docs/Status_Reference.md @@ -398,6 +398,12 @@ The following information is available in - `printer["servo "].value`: The last setting of the PWM pin (a value between 0.0 and 1.0) associated with the servo. +## stepper_enable + +The following information is available in the `stepper_enable` object (this +object is available if any stepper is defined): +- `steppers[""]`: Returns True if the given stepper is enabled. + ## system_stats The following information is available in the `system_stats` object diff --git a/klippy/extras/stepper_enable.py b/klippy/extras/stepper_enable.py index e8b41c0a..621ff700 100644 --- a/klippy/extras/stepper_enable.py +++ b/klippy/extras/stepper_enable.py @@ -108,6 +108,10 @@ class PrinterStepperEnable: el.motor_disable(print_time) logging.info("%s has been manually disabled", stepper) toolhead.dwell(DISABLE_STALL_TIME) + def get_status(self, eventtime): + steppers = { name: et.is_motor_enabled() + for (name, et) in self.enable_lines.items() } + return {'steppers': steppers} def _handle_request_restart(self, print_time): self.motor_off() def cmd_M18(self, gcmd):