Add disable_e_steppers function

This commit is contained in:
Scott Lahteine 2017-03-17 21:12:19 -05:00
parent 8eb29f91e6
commit 4c7f14752a
3 changed files with 13 additions and 24 deletions

View File

@ -223,6 +223,7 @@ void manage_inactivity(bool ignore_stepper_queue = false);
#define _AXIS(AXIS) AXIS ##_AXIS
void enable_all_steppers();
void disable_e_steppers();
void disable_all_steppers();
void FlushSerialRequestResend();

View File

@ -5918,12 +5918,7 @@ inline void gcode_M18_M84() {
if (code_seen('Y')) disable_y();
if (code_seen('Z')) disable_z();
#if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
if (code_seen('E')) {
disable_e0();
disable_e1();
disable_e2();
disable_e3();
}
if (code_seen('E')) disable_e_steppers();
#endif
}
}
@ -7330,10 +7325,7 @@ inline void gcode_M503() {
// Synchronize steppers and then disable extruders steppers for manual filament changing
stepper.synchronize();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
disable_e_steppers();
delay(100);
millis_t nozzle_timeout = millis() + (millis_t)(FILAMENT_CHANGE_NOZZLE_TIMEOUT) * 1000L;
@ -10123,16 +10115,20 @@ void enable_all_steppers() {
enable_e3();
}
void disable_all_steppers() {
disable_x();
disable_y();
disable_z();
void disable_e_steppers() {
disable_e0();
disable_e1();
disable_e2();
disable_e3();
}
void disable_all_steppers() {
disable_x();
disable_y();
disable_z();
disable_e_steppers();
}
#if ENABLED(AUTOMATIC_CURRENT_CONTROL)
void automatic_current_control(const TMC2130Stepper &st) {
@ -10240,10 +10236,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
disable_z();
#endif
#if ENABLED(DISABLE_INACTIVE_E)
disable_e0();
disable_e1();
disable_e2();
disable_e3();
disable_e_steppers();
#endif
}

View File

@ -450,12 +450,7 @@ void Planner::check_axes_activity() {
if (!axis_active[Z_AXIS]) disable_z();
#endif
#if ENABLED(DISABLE_E)
if (!axis_active[E_AXIS]) {
disable_e0();
disable_e1();
disable_e2();
disable_e3();
}
if (!axis_active[E_AXIS]) disable_e_steppers();
#endif
#if FAN_COUNT > 0