Fix 5 mixing steppers, etc.
Co-Authored-By: neorex <neorex99@gmail.com>
This commit is contained in:
parent
99393550f2
commit
ba46edec2a
@ -96,7 +96,10 @@ extern const char axis_codes[XYZE];
|
|||||||
/**
|
/**
|
||||||
* Mixing steppers synchronize their enable (and direction) together
|
* Mixing steppers synchronize their enable (and direction) together
|
||||||
*/
|
*/
|
||||||
#if MIXING_STEPPERS > 3
|
#if MIXING_STEPPERS > 4
|
||||||
|
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); E4_ENABLE_WRITE( E_ENABLE_ON); }
|
||||||
|
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); E4_ENABLE_WRITE(!E_ENABLE_ON); }
|
||||||
|
#elif MIXING_STEPPERS > 3
|
||||||
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
|
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
|
||||||
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
|
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
|
||||||
#elif MIXING_STEPPERS > 2
|
#elif MIXING_STEPPERS > 2
|
||||||
|
@ -13924,26 +13924,34 @@ void prepare_move_to_destination() {
|
|||||||
const millis_t ms = millis();
|
const millis_t ms = millis();
|
||||||
if (ELAPSED(ms, nextMotorCheck)) {
|
if (ELAPSED(ms, nextMotorCheck)) {
|
||||||
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
|
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
|
||||||
|
|
||||||
|
// If any of the drivers or the bed are enabled...
|
||||||
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
|
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
|| thermalManager.soft_pwm_amount_bed > 0
|
|| thermalManager.soft_pwm_amount_bed > 0
|
||||||
#endif
|
#endif
|
||||||
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
|
#if HAS_X2_ENABLE
|
||||||
|
|| X2_ENABLE_READ == X_ENABLE_ON
|
||||||
|
#endif
|
||||||
|
#if HAS_Y2_ENABLE
|
||||||
|
|| Y2_ENABLE_READ == Y_ENABLE_ON
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_ENABLE
|
||||||
|
|| Z2_ENABLE_READ == Z_ENABLE_ON
|
||||||
|
#endif
|
||||||
|
|| E0_ENABLE_READ == E_ENABLE_ON
|
||||||
#if E_STEPPERS > 1
|
#if E_STEPPERS > 1
|
||||||
|| E1_ENABLE_READ == E_ENABLE_ON
|
|| E1_ENABLE_READ == E_ENABLE_ON
|
||||||
#if HAS_X2_ENABLE
|
|
||||||
|| X2_ENABLE_READ == X_ENABLE_ON
|
|
||||||
#endif
|
|
||||||
#if E_STEPPERS > 2
|
#if E_STEPPERS > 2
|
||||||
|| E2_ENABLE_READ == E_ENABLE_ON
|
|| E2_ENABLE_READ == E_ENABLE_ON
|
||||||
#if E_STEPPERS > 3
|
#if E_STEPPERS > 3
|
||||||
|| E3_ENABLE_READ == E_ENABLE_ON
|
|| E3_ENABLE_READ == E_ENABLE_ON
|
||||||
#if E_STEPPERS > 4
|
#if E_STEPPERS > 4
|
||||||
|| E4_ENABLE_READ == E_ENABLE_ON
|
|| E4_ENABLE_READ == E_ENABLE_ON
|
||||||
#endif // E_STEPPERS > 4
|
#endif
|
||||||
#endif // E_STEPPERS > 3
|
#endif
|
||||||
#endif // E_STEPPERS > 2
|
#endif
|
||||||
#endif // E_STEPPERS > 1
|
#endif
|
||||||
) {
|
) {
|
||||||
lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
||||||
}
|
}
|
||||||
|
@ -49,20 +49,30 @@ bool Power::is_power_needed() {
|
|||||||
if (controllerFanSpeed > 0) return true;
|
if (controllerFanSpeed > 0) return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If any of the drivers or the bed are enabled...
|
||||||
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
|
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
|| thermalManager.soft_pwm_amount_bed > 0
|
|| thermalManager.soft_pwm_amount_bed > 0
|
||||||
|
#endif
|
||||||
|
#if HAS_X2_ENABLE
|
||||||
|
|| X2_ENABLE_READ == X_ENABLE_ON
|
||||||
#endif
|
#endif
|
||||||
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
|
#if HAS_Y2_ENABLE
|
||||||
|
|| Y2_ENABLE_READ == Y_ENABLE_ON
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_ENABLE
|
||||||
|
|| Z2_ENABLE_READ == Z_ENABLE_ON
|
||||||
|
#endif
|
||||||
|
|| E0_ENABLE_READ == E_ENABLE_ON
|
||||||
#if E_STEPPERS > 1
|
#if E_STEPPERS > 1
|
||||||
|| E1_ENABLE_READ == E_ENABLE_ON
|
|| E1_ENABLE_READ == E_ENABLE_ON
|
||||||
#if HAS_X2_ENABLE
|
|
||||||
|| X2_ENABLE_READ == X_ENABLE_ON
|
|
||||||
#endif
|
|
||||||
#if E_STEPPERS > 2
|
#if E_STEPPERS > 2
|
||||||
|| E2_ENABLE_READ == E_ENABLE_ON
|
|| E2_ENABLE_READ == E_ENABLE_ON
|
||||||
#if E_STEPPERS > 3
|
#if E_STEPPERS > 3
|
||||||
|| E3_ENABLE_READ == E_ENABLE_ON
|
|| E3_ENABLE_READ == E_ENABLE_ON
|
||||||
|
#if E_STEPPERS > 4
|
||||||
|
|| E4_ENABLE_READ == E_ENABLE_ON
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user