🎨 Fix L64xx enable, clean up conditionals

This commit is contained in:
Scott Lahteine 2021-09-21 06:25:13 -05:00
parent a37580e4e8
commit ea3df94213
14 changed files with 256 additions and 356 deletions

View File

@ -207,7 +207,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
#if ENABLED(MULTI_FILAMENT_SENSOR)
#define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
switch (active_extruder) {
REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_INSERTED)
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED)
}
#else
if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;

View File

@ -56,10 +56,10 @@ void GcodeSuite::M150() {
#if ENABLED(NEOPIXEL_LED)
const int8_t index = parser.intval('I', -1);
#if ENABLED(NEOPIXEL2_SEPARATE)
int8_t brightness, unit = parser.intval('S', -1);
int8_t brightness = neo.brightness(), unit = parser.intval('S', -1);
switch (unit) {
case -1: neo2.neoindex = index; // fall-thru
case 0: neo.neoindex = index; brightness = neo.brightness(); break;
case 0: neo.neoindex = index; break;
case 1: neo2.neoindex = index; brightness = neo2.brightness(); break;
}
#else

View File

@ -94,6 +94,8 @@
#endif
#if HAS_Z_AXIS
#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
#else
#undef CONTROLLER_FAN_USE_Z_ONLY
#endif
#if LINEAR_AXES >= 4
#define I_MAX_LENGTH (I_MAX_POS - (I_MIN_POS))
@ -465,31 +467,6 @@
#define NO_LCD_REINIT 1 // Suppress LCD re-initialization
#endif
/**
* Set defaults for missing (newer) options
*/
#ifndef DISABLE_INACTIVE_X
#define DISABLE_INACTIVE_X DISABLE_X
#endif
#if HAS_Y_AXIS && !defined(DISABLE_INACTIVE_Y)
#define DISABLE_INACTIVE_Y DISABLE_Y
#endif
#if HAS_Z_AXIS && !defined(DISABLE_INACTIVE_Z)
#define DISABLE_INACTIVE_Z DISABLE_Z
#endif
#ifndef DISABLE_INACTIVE_E
#define DISABLE_INACTIVE_E DISABLE_E
#endif
#if LINEAR_AXES >= 4 && !defined(DISABLE_INACTIVE_I)
#define DISABLE_INACTIVE_I DISABLE_I
#endif
#if LINEAR_AXES >= 5 && !defined(DISABLE_INACTIVE_J)
#define DISABLE_INACTIVE_J DISABLE_J
#endif
#if LINEAR_AXES >= 6 && !defined(DISABLE_INACTIVE_K)
#define DISABLE_INACTIVE_K DISABLE_K
#endif
/**
* Power Supply
*/
@ -1463,7 +1440,7 @@
#define HAS_X_MS_PINS 1
#endif
#if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
#if PIN_EXISTS(X2_ENABLE) || AXIS_IS_L64XX(X2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
#define HAS_X2_ENABLE 1
#endif
#if PIN_EXISTS(X2_DIR)
@ -1476,8 +1453,15 @@
#define HAS_X2_MS_PINS 1
#endif
/**
* Set defaults for missing (newer) options
*/
#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
#define DISABLE_INACTIVE_X 1
#endif
#if HAS_Y_AXIS
#if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
#if PIN_EXISTS(Y_ENABLE) || AXIS_IS_L64XX(Y) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
#define HAS_Y_ENABLE 1
#endif
#if PIN_EXISTS(Y_DIR)
@ -1490,7 +1474,7 @@
#define HAS_Y_MS_PINS 1
#endif
#if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
#if PIN_EXISTS(Y2_ENABLE) || AXIS_IS_L64XX(Y2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
#define HAS_Y2_ENABLE 1
#endif
#if PIN_EXISTS(Y2_DIR)
@ -1502,10 +1486,15 @@
#if PIN_EXISTS(Y2_MS1)
#define HAS_Y2_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
#define DISABLE_INACTIVE_Y 1
#endif
#else
#undef DISABLE_INACTIVE_Y
#endif
#if HAS_Z_AXIS
#if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
#if PIN_EXISTS(Z_ENABLE) || AXIS_IS_L64XX(Z) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
#define HAS_Z_ENABLE 1
#endif
#if PIN_EXISTS(Z_DIR)
@ -1517,10 +1506,15 @@
#if PIN_EXISTS(Z_MS1)
#define HAS_Z_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
#define DISABLE_INACTIVE_Z 1
#endif
#else
#undef DISABLE_INACTIVE_Z
#endif
#if NUM_Z_STEPPER_DRIVERS >= 2
#if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#define HAS_Z2_ENABLE 1
#endif
#if PIN_EXISTS(Z2_DIR)
@ -1535,7 +1529,7 @@
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#define HAS_Z3_ENABLE 1
#endif
#if PIN_EXISTS(Z3_DIR)
@ -1550,7 +1544,7 @@
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#define HAS_Z4_ENABLE 1
#endif
#if PIN_EXISTS(Z4_DIR)
@ -1565,7 +1559,7 @@
#endif
#if LINEAR_AXES >= 4
#if PIN_EXISTS(I_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
#if PIN_EXISTS(I_ENABLE) || AXIS_IS_L64XX(I) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
#define HAS_I_ENABLE 1
#endif
#if PIN_EXISTS(I_DIR)
@ -1577,10 +1571,15 @@
#if PIN_EXISTS(I_MS1)
#define HAS_I_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
#define DISABLE_INACTIVE_I 1
#endif
#else
#undef DISABLE_INACTIVE_I
#endif
#if LINEAR_AXES >= 5
#if PIN_EXISTS(J_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
#if PIN_EXISTS(J_ENABLE) || AXIS_IS_L64XX(J) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
#define HAS_J_ENABLE 1
#endif
#if PIN_EXISTS(J_DIR)
@ -1592,10 +1591,15 @@
#if PIN_EXISTS(J_MS1)
#define HAS_J_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
#define DISABLE_INACTIVE_J 1
#endif
#else
#undef DISABLE_INACTIVE_J
#endif
#if LINEAR_AXES >= 6
#if PIN_EXISTS(K_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
#if PIN_EXISTS(K_ENABLE) || AXIS_IS_L64XX(K) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
#define HAS_K_ENABLE 1
#endif
#if PIN_EXISTS(K_DIR)
@ -1607,12 +1611,17 @@
#if PIN_EXISTS(K_MS1)
#define HAS_K_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
#define DISABLE_INACTIVE_K 1
#endif
#else
#undef DISABLE_INACTIVE_K
#endif
// Extruder steppers and solenoids
#if HAS_EXTRUDERS
#if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
#if PIN_EXISTS(E0_ENABLE) || AXIS_IS_L64XX(E0) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
#define HAS_E0_ENABLE 1
#endif
#if PIN_EXISTS(E0_DIR)
@ -1628,118 +1637,137 @@
#define HAS_SOLENOID_0 1
#endif
#if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
#define HAS_E1_ENABLE 1
#endif
#if PIN_EXISTS(E1_DIR)
#define HAS_E1_DIR 1
#endif
#if PIN_EXISTS(E1_STEP)
#define HAS_E1_STEP 1
#endif
#if PIN_EXISTS(E1_MS1)
#define HAS_E1_MS_PINS 1
#endif
#if PIN_EXISTS(SOL1)
#define HAS_SOLENOID_1 1
#if E_STEPPERS > 1
#if PIN_EXISTS(E1_ENABLE) || AXIS_IS_L64XX(E1) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
#define HAS_E1_ENABLE 1
#endif
#if PIN_EXISTS(E1_DIR)
#define HAS_E1_DIR 1
#endif
#if PIN_EXISTS(E1_STEP)
#define HAS_E1_STEP 1
#endif
#if PIN_EXISTS(E1_MS1)
#define HAS_E1_MS_PINS 1
#endif
#if PIN_EXISTS(SOL1)
#define HAS_SOLENOID_1 1
#endif
#endif
#if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
#define HAS_E2_ENABLE 1
#endif
#if PIN_EXISTS(E2_DIR)
#define HAS_E2_DIR 1
#endif
#if PIN_EXISTS(E2_STEP)
#define HAS_E2_STEP 1
#endif
#if PIN_EXISTS(E2_MS1)
#define HAS_E2_MS_PINS 1
#endif
#if PIN_EXISTS(SOL2)
#define HAS_SOLENOID_2 1
#if E_STEPPERS > 2
#if PIN_EXISTS(E2_ENABLE) || AXIS_IS_L64XX(E2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
#define HAS_E2_ENABLE 1
#endif
#if PIN_EXISTS(E2_DIR)
#define HAS_E2_DIR 1
#endif
#if PIN_EXISTS(E2_STEP)
#define HAS_E2_STEP 1
#endif
#if PIN_EXISTS(E2_MS1)
#define HAS_E2_MS_PINS 1
#endif
#if PIN_EXISTS(SOL2)
#define HAS_SOLENOID_2 1
#endif
#endif
#if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
#define HAS_E3_ENABLE 1
#endif
#if PIN_EXISTS(E3_DIR)
#define HAS_E3_DIR 1
#endif
#if PIN_EXISTS(E3_STEP)
#define HAS_E3_STEP 1
#endif
#if PIN_EXISTS(E3_MS1)
#define HAS_E3_MS_PINS 1
#endif
#if PIN_EXISTS(SOL3)
#define HAS_SOLENOID_3 1
#if E_STEPPERS > 3
#if PIN_EXISTS(E3_ENABLE) || AXIS_IS_L64XX(E3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
#define HAS_E3_ENABLE 1
#endif
#if PIN_EXISTS(E3_DIR)
#define HAS_E3_DIR 1
#endif
#if PIN_EXISTS(E3_STEP)
#define HAS_E3_STEP 1
#endif
#if PIN_EXISTS(E3_MS1)
#define HAS_E3_MS_PINS 1
#endif
#if PIN_EXISTS(SOL3)
#define HAS_SOLENOID_3 1
#endif
#endif
#if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
#define HAS_E4_ENABLE 1
#endif
#if PIN_EXISTS(E4_DIR)
#define HAS_E4_DIR 1
#endif
#if PIN_EXISTS(E4_STEP)
#define HAS_E4_STEP 1
#endif
#if PIN_EXISTS(E4_MS1)
#define HAS_E4_MS_PINS 1
#endif
#if PIN_EXISTS(SOL4)
#define HAS_SOLENOID_4 1
#if E_STEPPERS > 4
#if PIN_EXISTS(E4_ENABLE) || AXIS_IS_L64XX(E4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
#define HAS_E4_ENABLE 1
#endif
#if PIN_EXISTS(E4_DIR)
#define HAS_E4_DIR 1
#endif
#if PIN_EXISTS(E4_STEP)
#define HAS_E4_STEP 1
#endif
#if PIN_EXISTS(E4_MS1)
#define HAS_E4_MS_PINS 1
#endif
#if PIN_EXISTS(SOL4)
#define HAS_SOLENOID_4 1
#endif
#endif
#if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
#define HAS_E5_ENABLE 1
#endif
#if PIN_EXISTS(E5_DIR)
#define HAS_E5_DIR 1
#endif
#if PIN_EXISTS(E5_STEP)
#define HAS_E5_STEP 1
#endif
#if PIN_EXISTS(E5_MS1)
#define HAS_E5_MS_PINS 1
#endif
#if PIN_EXISTS(SOL5)
#define HAS_SOLENOID_5 1
#if E_STEPPERS > 5
#if PIN_EXISTS(E5_ENABLE) || AXIS_IS_L64XX(E5) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
#define HAS_E5_ENABLE 1
#endif
#if PIN_EXISTS(E5_DIR)
#define HAS_E5_DIR 1
#endif
#if PIN_EXISTS(E5_STEP)
#define HAS_E5_STEP 1
#endif
#if PIN_EXISTS(E5_MS1)
#define HAS_E5_MS_PINS 1
#endif
#if PIN_EXISTS(SOL5)
#define HAS_SOLENOID_5 1
#endif
#endif
#if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
#define HAS_E6_ENABLE 1
#endif
#if PIN_EXISTS(E6_DIR)
#define HAS_E6_DIR 1
#endif
#if PIN_EXISTS(E6_STEP)
#define HAS_E6_STEP 1
#endif
#if PIN_EXISTS(E6_MS1)
#define HAS_E6_MS_PINS 1
#endif
#if PIN_EXISTS(SOL6)
#define HAS_SOLENOID_6 1
#if E_STEPPERS > 6
#if PIN_EXISTS(E6_ENABLE) || AXIS_IS_L64XX(E6) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
#define HAS_E6_ENABLE 1
#endif
#if PIN_EXISTS(E6_DIR)
#define HAS_E6_DIR 1
#endif
#if PIN_EXISTS(E6_STEP)
#define HAS_E6_STEP 1
#endif
#if PIN_EXISTS(E6_MS1)
#define HAS_E6_MS_PINS 1
#endif
#if PIN_EXISTS(SOL6)
#define HAS_SOLENOID_6 1
#endif
#endif
#if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
#define HAS_E7_ENABLE 1
#endif
#if PIN_EXISTS(E7_DIR)
#define HAS_E7_DIR 1
#endif
#if PIN_EXISTS(E7_STEP)
#define HAS_E7_STEP 1
#endif
#if PIN_EXISTS(E7_MS1)
#define HAS_E7_MS_PINS 1
#endif
#if PIN_EXISTS(SOL7)
#define HAS_SOLENOID_7 1
#if E_STEPPERS > 7
#if PIN_EXISTS(E7_ENABLE) || AXIS_IS_L64XX(E7) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
#define HAS_E7_ENABLE 1
#endif
#if PIN_EXISTS(E7_DIR)
#define HAS_E7_DIR 1
#endif
#if PIN_EXISTS(E7_STEP)
#define HAS_E7_STEP 1
#endif
#if PIN_EXISTS(E7_MS1)
#define HAS_E7_MS_PINS 1
#endif
#if PIN_EXISTS(SOL7)
#define HAS_SOLENOID_7 1
#endif
#endif
#if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
#define DISABLE_INACTIVE_E 1
#endif
#else
#undef DISABLE_INACTIVE_E
#endif // HAS_EXTRUDERS
//
@ -1992,12 +2020,6 @@
#endif
#endif
#if (HAS_E_DRIVER(TMC2660) \
|| ( E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != X_ENABLE_PIN \
&& E0_ENABLE_PIN != Y_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN ) )
#define HAS_E_STEPPER_ENABLE 1
#endif
#if ANY_AXIS_HAS(HW_SERIAL)
#define HAS_TMC_HW_SERIAL 1
#endif
@ -3255,11 +3277,6 @@
#define SD_SPI_SPEED SPI_FULL_SPEED
#endif
// Defined here to catch the above defines
#if ENABLED(SDCARD_SORT_ALPHA) && (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
#define HAS_FOLDER_SORTING 1
#endif
#if HAS_WIRED_LCD
// Get LCD character width/height, which may be overridden by pins, configs, etc.
#ifndef LCD_WIDTH

View File

@ -2355,46 +2355,30 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
#endif
#if E_STEPPERS
#if !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
#error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 1
#if !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
#error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 2
#if !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
#error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 3
#if !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
#error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 4
#if !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
#error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 5
#if !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
#error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 6
#if !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
#error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 7
#if !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
#error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board."
#endif
#endif // E_STEPPERS > 7
#endif // E_STEPPERS > 6
#endif // E_STEPPERS > 5
#endif // E_STEPPERS > 4
#endif // E_STEPPERS > 3
#endif // E_STEPPERS > 2
#endif // E_STEPPERS > 1
#endif // E_STEPPERS
#if E_STEPPERS > 0 && !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
#error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 1 && !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
#error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 2 && !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
#error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 3 && !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
#error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 4 && !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
#error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 5 && !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
#error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 6 && !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
#error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board."
#endif
#if E_STEPPERS > 7 && !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
#error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board."
#endif
/**
* Endstop Tests

View File

@ -229,13 +229,9 @@ void DGUSRxHandler::Flowrate(DGUS_VP &vp, void *data_ptr) {
switch (vp.addr) {
default: return;
case DGUS_Addr::ADJUST_SetFlowrate_CUR:
#if EXTRUDERS > 1
ExtUI::setFlow_percent(flowrate, ExtUI::getActiveTool());
#else
ExtUI::setFlow_percent(flowrate, ExtUI::E0);
#endif
ExtUI::setFlow_percent(flowrate, TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0));
break;
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
case DGUS_Addr::ADJUST_SetFlowrate_E0:
ExtUI::setFlow_percent(flowrate, ExtUI::E0);
break;
@ -557,9 +553,7 @@ void DGUSRxHandler::FilamentSelect(DGUS_VP &vp, void *data_ptr) {
default: return;
case DGUS_Data::Extruder::CURRENT:
case DGUS_Data::Extruder::E0:
#if EXTRUDERS > 1
case DGUS_Data::Extruder::E1:
#endif
TERN_(HAS_MULTI_EXTRUDER, case DGUS_Data::Extruder::E1:)
dgus_screen_handler.filament_extruder = extruder;
break;
}
@ -590,14 +584,14 @@ void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) {
switch (dgus_screen_handler.filament_extruder) {
default: return;
case DGUS_Data::Extruder::CURRENT:
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
extruder = ExtUI::getActiveTool();
break;
#endif
case DGUS_Data::Extruder::E0:
extruder = ExtUI::E0;
break;
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
case DGUS_Data::Extruder::E1:
extruder = ExtUI::E1;
break;

View File

@ -249,13 +249,9 @@ void DGUSTxHandler::Flowrate(DGUS_VP &vp) {
switch (vp.addr) {
default: return;
case DGUS_Addr::ADJUST_Flowrate_CUR:
#if EXTRUDERS > 1
flowrate = ExtUI::getFlow_percent(ExtUI::getActiveTool());
#else
flowrate = ExtUI::getFlow_percent(ExtUI::E0);
#endif
flowrate = ExtUI::getFlow_percent(TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0));
break;
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
case DGUS_Addr::ADJUST_Flowrate_E0:
flowrate = ExtUI::getFlow_percent(ExtUI::E0);
break;
@ -366,7 +362,7 @@ void DGUSTxHandler::FilamentIcons(DGUS_VP &vp) {
switch (dgus_screen_handler.filament_extruder) {
default: return;
case DGUS_Data::Extruder::CURRENT:
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
switch (ExtUI::getActiveTool()) {
default: break;
case ExtUI::E0:

View File

@ -55,7 +55,7 @@ enum class DGUS_Addr : uint16_t {
STATUS_Resume = 0x2009, // Popup / Data: DGUS_Data::Popup
ADJUST_SetFeedrate = 0x200A, // Type: Integer (16 bits signed)
ADJUST_SetFlowrate_CUR = 0x200B, // Type: Integer (16 bits signed)
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
ADJUST_SetFlowrate_E0 = 0x200C, // Type: Integer (16 bits signed)
ADJUST_SetFlowrate_E1 = 0x200D, // Type: Integer (16 bits signed)
#endif
@ -113,7 +113,7 @@ enum class DGUS_Addr : uint16_t {
STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon
ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed)
ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed)
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
ADJUST_Flowrate_E0 = 0x30FA, // Type: Integer (16 bits signed)
ADJUST_Flowrate_E1 = 0x30FB, // Type: Integer (16 bits signed)
#endif

View File

@ -92,7 +92,7 @@ const struct DGUS_VP vp_list[] PROGMEM = {
VP_HELPER_RX(DGUS_Addr::ADJUST_SetFeedrate, &DGUSRxHandler::Feedrate),
VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_CUR, &DGUSRxHandler::Flowrate),
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E0, &DGUSRxHandler::Flowrate),
VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E1, &DGUSRxHandler::Flowrate),
#endif
@ -194,7 +194,7 @@ const struct DGUS_VP vp_list[] PROGMEM = {
VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_CUR,
nullptr,
&DGUSTxHandler::Flowrate),
#if EXTRUDERS > 1
#if HAS_MULTI_EXTRUDER
VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E0,
nullptr,
&DGUSTxHandler::Flowrate),

View File

@ -988,11 +988,11 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
if (card.isFileOpen()) {
//saved_feedrate_percentage = feedrate_percentage;
feedrate_percentage = 100;
#if EXTRUDERS
#if HAS_EXTRUDERS
planner.flow_percentage[0] = 100;
planner.e_factor[0] = planner.flow_percentage[0] * 0.01f;
#endif
#if EXTRUDERS == 2
#if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = 100;
planner.e_factor[1] = planner.flow_percentage[1] * 0.01f;
#endif

View File

@ -48,8 +48,17 @@
#include "delta.h"
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#include "planner.h"
#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS)
#include "stepper/indirection.h"
#if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF)
#include "stepper.h"
#endif
#if USE_SENSORLESS
#include "../feature/tmc_util.h"
#if ENABLED(IMPROVE_HOMING_RELIABILITY)
#include "planner.h"
#endif
#endif
#endif
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
@ -68,15 +77,6 @@
#include "servo.h"
#endif
#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING)
#include "stepper.h"
#include "../feature/tmc_util.h"
#endif
#if HAS_QUIET_PROBING
#include "stepper/indirection.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
@ -818,7 +818,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
#endif // HAS_Z_SERVO_PROBE
#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING)
#if USE_SENSORLESS
sensorless_t stealth_states { false };

View File

@ -263,7 +263,7 @@ public:
#endif
// Basic functions for Sensorless Homing and Probing
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
#if USE_SENSORLESS
static void enable_stallguard_diag1();
static void disable_stallguard_diag1();
static void set_homing_current(const bool onoff);

View File

@ -667,183 +667,87 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
//
#ifndef ENABLE_STEPPER_X
#if HAS_X_ENABLE
#define ENABLE_STEPPER_X() X_ENABLE_WRITE( X_ENABLE_ON)
#else
#define ENABLE_STEPPER_X() NOOP
#endif
#define ENABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE( X_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_X
#if HAS_X_ENABLE
#define DISABLE_STEPPER_X() X_ENABLE_WRITE(!X_ENABLE_ON)
#else
#define DISABLE_STEPPER_X() NOOP
#endif
#define DISABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE(!X_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_X2
#if HAS_X2_ENABLE
#define ENABLE_STEPPER_X2() X2_ENABLE_WRITE( X_ENABLE_ON)
#else
#define ENABLE_STEPPER_X2() NOOP
#endif
#define ENABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE( X_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_X2
#if HAS_X2_ENABLE
#define DISABLE_STEPPER_X2() X2_ENABLE_WRITE(!X_ENABLE_ON)
#else
#define DISABLE_STEPPER_X2() NOOP
#endif
#define DISABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE(!X_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Y
#if HAS_Y_ENABLE
#define ENABLE_STEPPER_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
#else
#define ENABLE_STEPPER_Y() NOOP
#endif
#define ENABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE( Y_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Y
#if HAS_Y_ENABLE
#define DISABLE_STEPPER_Y() Y_ENABLE_WRITE(!Y_ENABLE_ON)
#else
#define DISABLE_STEPPER_Y() NOOP
#endif
#define DISABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE(!Y_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Y2
#if HAS_Y2_ENABLE
#define ENABLE_STEPPER_Y2() Y2_ENABLE_WRITE( Y_ENABLE_ON)
#else
#define ENABLE_STEPPER_Y2() NOOP
#endif
#define ENABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE( Y_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Y2
#if HAS_Y2_ENABLE
#define DISABLE_STEPPER_Y2() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
#else
#define DISABLE_STEPPER_Y2() NOOP
#endif
#define DISABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE(!Y_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Z
#if HAS_Z_ENABLE
#define ENABLE_STEPPER_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
#else
#define ENABLE_STEPPER_Z() NOOP
#endif
#define ENABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Z
#if HAS_Z_ENABLE
#define DISABLE_STEPPER_Z() Z_ENABLE_WRITE(!Z_ENABLE_ON)
#else
#define DISABLE_STEPPER_Z() NOOP
#endif
#define DISABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Z2
#if HAS_Z2_ENABLE
#define ENABLE_STEPPER_Z2() Z2_ENABLE_WRITE( Z_ENABLE_ON)
#else
#define ENABLE_STEPPER_Z2() NOOP
#endif
#define ENABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Z2
#if HAS_Z2_ENABLE
#define DISABLE_STEPPER_Z2() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
#else
#define DISABLE_STEPPER_Z2() NOOP
#endif
#define DISABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Z3
#if HAS_Z3_ENABLE
#define ENABLE_STEPPER_Z3() Z3_ENABLE_WRITE( Z_ENABLE_ON)
#else
#define ENABLE_STEPPER_Z3() NOOP
#endif
#define ENABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Z3
#if HAS_Z3_ENABLE
#define DISABLE_STEPPER_Z3() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
#else
#define DISABLE_STEPPER_Z3() NOOP
#endif
#define DISABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_Z4
#if HAS_Z4_ENABLE
#define ENABLE_STEPPER_Z4() Z4_ENABLE_WRITE( Z_ENABLE_ON)
#else
#define ENABLE_STEPPER_Z4() NOOP
#endif
#define ENABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_Z4
#if HAS_Z4_ENABLE
#define DISABLE_STEPPER_Z4() Z4_ENABLE_WRITE(!Z_ENABLE_ON)
#else
#define DISABLE_STEPPER_Z4() NOOP
#endif
#define DISABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_I
#if HAS_I_ENABLE
#define ENABLE_STEPPER_I() I_ENABLE_WRITE( I_ENABLE_ON)
#else
#define ENABLE_STEPPER_I() NOOP
#endif
#define ENABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE( I_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_I
#if HAS_I_ENABLE
#define DISABLE_STEPPER_I() I_ENABLE_WRITE(!I_ENABLE_ON)
#else
#define DISABLE_STEPPER_I() NOOP
#endif
#define DISABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE(!I_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_J
#if HAS_J_ENABLE
#define ENABLE_STEPPER_J() J_ENABLE_WRITE( J_ENABLE_ON)
#else
#define ENABLE_STEPPER_J() NOOP
#endif
#define ENABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE( J_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_J
#if HAS_J_ENABLE
#define DISABLE_STEPPER_J() J_ENABLE_WRITE(!J_ENABLE_ON)
#else
#define DISABLE_STEPPER_J() NOOP
#endif
#define DISABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE(!J_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_K
#if HAS_K_ENABLE
#define ENABLE_STEPPER_K() K_ENABLE_WRITE( K_ENABLE_ON)
#else
#define ENABLE_STEPPER_K() NOOP
#endif
#define ENABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE( K_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_K
#if HAS_K_ENABLE
#define DISABLE_STEPPER_K() K_ENABLE_WRITE(!K_ENABLE_ON)
#else
#define DISABLE_STEPPER_K() NOOP
#endif
#define DISABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE(!K_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_E0
#if HAS_E0_ENABLE
#define ENABLE_STEPPER_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
#else
#define ENABLE_STEPPER_E0() NOOP
#endif
#define ENABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE( E_ENABLE_ON), NOOP)
#endif
#ifndef DISABLE_STEPPER_E0
#if HAS_E0_ENABLE
#define DISABLE_STEPPER_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define DISABLE_STEPPER_E0() NOOP
#endif
#define DISABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE(!E_ENABLE_ON), NOOP)
#endif
#ifndef ENABLE_STEPPER_E1

View File

@ -194,7 +194,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z
#endif
static constexpr chopper_timing_t chopper_timing_Z2 = CHOPPER_TIMING_Z2;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define Z2_ENABLE_INIT() NOOP
#define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z2.toff : 0)
#define Z2_ENABLE_READ() stepperZ2.isEnabled()
@ -287,7 +287,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E0 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E0 = CHOPPER_TIMING_E0;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E0_ENABLE_INIT() NOOP
#define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing_E0.toff : 0)
#define E0_ENABLE_READ() stepperE0.isEnabled()
@ -304,7 +304,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E1 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E1 = CHOPPER_TIMING_E1;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E1_ENABLE_INIT() NOOP
#define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing_E1.toff : 0)
#define E1_ENABLE_READ() stepperE1.isEnabled()
@ -321,7 +321,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E2 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E2 = CHOPPER_TIMING_E2;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E2_ENABLE_INIT() NOOP
#define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing_E2.toff : 0)
#define E2_ENABLE_READ() stepperE2.isEnabled()
@ -338,7 +338,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E3 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E3 = CHOPPER_TIMING_E3;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E3_ENABLE_INIT() NOOP
#define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing_E3.toff : 0)
#define E3_ENABLE_READ() stepperE3.isEnabled()
@ -355,7 +355,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E4 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E4 = CHOPPER_TIMING_E4;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E4_ENABLE_INIT() NOOP
#define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing_E4.toff : 0)
#define E4_ENABLE_READ() stepperE4.isEnabled()
@ -372,7 +372,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E5 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E5 = CHOPPER_TIMING_E5;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E5_ENABLE_INIT() NOOP
#define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing_E5.toff : 0)
#define E5_ENABLE_READ() stepperE5.isEnabled()
@ -389,7 +389,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E6 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E6 = CHOPPER_TIMING_E6;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E6_ENABLE_INIT() NOOP
#define E6_ENABLE_WRITE(STATE) stepperE6.toff((STATE)==E_ENABLE_ON ? chopper_timing_E6.toff : 0)
#define E6_ENABLE_READ() stepperE6.isEnabled()
@ -406,7 +406,7 @@ void reset_trinamic_drivers();
#define CHOPPER_TIMING_E7 CHOPPER_TIMING_E
#endif
static constexpr chopper_timing_t chopper_timing_E7 = CHOPPER_TIMING_E7;
#if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7)
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
#define E7_ENABLE_INIT() NOOP
#define E7_ENABLE_WRITE(STATE) stepperE7.toff((STATE)==E_ENABLE_ON ? chopper_timing_E7.toff : 0)
#define E7_ENABLE_READ() stepperE7.isEnabled()

View File

@ -27,8 +27,13 @@
extern const char M23_STR[], M24_STR[];
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_DYNAMIC_RAM)
#define SD_RESORT 1
#if ENABLED(SDCARD_SORT_ALPHA)
#if ENABLED(SDSORT_DYNAMIC_RAM)
#define SD_RESORT 1
#endif
#if FOLDER_SORTING || ENABLED(SDSORT_GCODE)
#define HAS_FOLDER_SORTING 1
#endif
#endif
#if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA)