Invoke flush_step_generation() prior to checking motor enable state as
this is the best way to ensure all stepper active callbacks have been
invoked (which could change the enable line state).
Also, there is no longer a reason to add additional toolhead dwells
when enabling a stepper motor.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There were several slightly different implementations of explicit
stepper motor enabling/disabling in the force_move, stepper_enable,
and manual_stepper modules. Introduce a new set_motors_enable()
method and use this in all implementations. This simplifies the code
and reduces the chance of obscure timing issues.
This fixes a manual_stepper error introduced in commit 9399e738. That
commit changed the manual_stepper class to no longer explicitly flush
and clear all steps after each move, which broke the expectations of
manual_stepper's custom enable code. Using the more robust
implementation in stepper_enable fixes that issue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Pass a string such as "xyz" to kin.clear_homing_state(). This makes
the parameter a little less cryptic.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Call clear_homing_state() on each motor off event. This simplifies
the kinematic classes as they no longer need to register and handle
the motor_off event.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Document change in behavior of the controller_fan module.
Lookup heater objects in connect() event handler.
Return list of stepper names from stepper_enable.get_steppers().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allows contoller_fan sections to monitor only certain steppers instead of
all of them, similar to how heaters are currently handled.
Signed-off-by: Sophie Hirn <sophie.hirn@wyvernscale.com>
Now that the tmc drivers perform automatic soft stepper enabling,
there is no need to be able to list multiple pins in the enable_pin
config setting.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Automatically detect if the stepper has a dedicated enable line. If
it does not, then automatically enable virtual enable support.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the enable line tracking out of the main stepper.py code. This
simplifies the main kinematic code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Directly disable all the stepper motors on a global motor_off() from
the StepperEnable() class in stepper_enable.py. This simplifies the
toolhead and kinematic classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>