Gradual step towards EXTRUDERS 0 support
This commit is contained in:
parent
99d0022fae
commit
2f1e1dcb42
10 changed files with 191 additions and 145 deletions
|
@ -53,22 +53,24 @@ void controllerfan_update() {
|
||||||
#if HAS_Z3_ENABLE
|
#if HAS_Z3_ENABLE
|
||||||
|| Z3_ENABLE_READ == Z_ENABLE_ON
|
|| Z3_ENABLE_READ == Z_ENABLE_ON
|
||||||
#endif
|
#endif
|
||||||
|| E0_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS
|
||||||
#if E_STEPPERS > 1
|
|| E0_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E1_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 1
|
||||||
#if E_STEPPERS > 2
|
|| E1_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E2_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 2
|
||||||
#if E_STEPPERS > 3
|
|| E2_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E3_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 3
|
||||||
#if E_STEPPERS > 4
|
|| E3_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E4_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 4
|
||||||
#if E_STEPPERS > 5
|
|| E4_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E5_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 5
|
||||||
#endif
|
|| E5_ENABLE_READ == E_ENABLE_ON
|
||||||
#endif
|
#endif // E_STEPPERS > 5
|
||||||
#endif
|
#endif // E_STEPPERS > 4
|
||||||
#endif
|
#endif // E_STEPPERS > 3
|
||||||
#endif
|
#endif // E_STEPPERS > 2
|
||||||
|
#endif // E_STEPPERS > 1
|
||||||
|
#endif // E_STEPPERS
|
||||||
) {
|
) {
|
||||||
lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,22 +64,24 @@ bool Power::is_power_needed() {
|
||||||
#if HAS_Z2_ENABLE
|
#if HAS_Z2_ENABLE
|
||||||
|| Z2_ENABLE_READ == Z_ENABLE_ON
|
|| Z2_ENABLE_READ == Z_ENABLE_ON
|
||||||
#endif
|
#endif
|
||||||
|| E0_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS
|
||||||
#if E_STEPPERS > 1
|
|| E0_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E1_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 1
|
||||||
#if E_STEPPERS > 2
|
|| E1_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E2_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 2
|
||||||
#if E_STEPPERS > 3
|
|| E2_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E3_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 3
|
||||||
#if E_STEPPERS > 4
|
|| E3_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E4_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 4
|
||||||
#if E_STEPPERS > 5
|
|| E4_ENABLE_READ == E_ENABLE_ON
|
||||||
|| E5_ENABLE_READ == E_ENABLE_ON
|
#if E_STEPPERS > 5
|
||||||
#endif
|
|| E5_ENABLE_READ == E_ENABLE_ON
|
||||||
#endif
|
#endif // E_STEPPERS > 5
|
||||||
#endif
|
#endif // E_STEPPERS > 4
|
||||||
#endif
|
#endif // E_STEPPERS > 3
|
||||||
#endif
|
#endif // E_STEPPERS > 2
|
||||||
|
#endif // E_STEPPERS > 1
|
||||||
|
#endif // E_STEPPERS
|
||||||
) return true;
|
) return true;
|
||||||
|
|
||||||
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
|
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
|
||||||
|
|
|
@ -232,28 +232,30 @@
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case E_AXIS: {
|
case E_AXIS: {
|
||||||
const int8_t target_extruder = get_target_extruder_from_command();
|
#if E_STEPPERS
|
||||||
if (target_extruder < 0) return;
|
const int8_t target_extruder = get_target_extruder_from_command();
|
||||||
switch (target_extruder) {
|
if (target_extruder < 0) return;
|
||||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
switch (target_extruder) {
|
||||||
case 0: TMC_SET_PWMTHRS_E(0); break;
|
#if AXIS_HAS_STEALTHCHOP(E0)
|
||||||
#endif
|
case 0: TMC_SET_PWMTHRS_E(0); break;
|
||||||
#if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
|
#endif
|
||||||
case 1: TMC_SET_PWMTHRS_E(1); break;
|
#if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
|
||||||
#endif
|
case 1: TMC_SET_PWMTHRS_E(1); break;
|
||||||
#if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
|
#endif
|
||||||
case 2: TMC_SET_PWMTHRS_E(2); break;
|
#if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
|
||||||
#endif
|
case 2: TMC_SET_PWMTHRS_E(2); break;
|
||||||
#if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
|
#endif
|
||||||
case 3: TMC_SET_PWMTHRS_E(3); break;
|
#if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
|
||||||
#endif
|
case 3: TMC_SET_PWMTHRS_E(3); break;
|
||||||
#if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
|
#endif
|
||||||
case 4: TMC_SET_PWMTHRS_E(4); break;
|
#if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
|
||||||
#endif
|
case 4: TMC_SET_PWMTHRS_E(4); break;
|
||||||
#if E_STEPPERS > 5 && AXIS_HAS_STEALTHCHOP(E5)
|
#endif
|
||||||
case 5: TMC_SET_PWMTHRS_E(5); break;
|
#if E_STEPPERS > 5 && AXIS_HAS_STEALTHCHOP(E5)
|
||||||
#endif
|
case 5: TMC_SET_PWMTHRS_E(5); break;
|
||||||
}
|
#endif
|
||||||
|
}
|
||||||
|
#endif // E_STEPPERS
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +282,7 @@
|
||||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||||
TMC_SAY_PWMTHRS(Z,Z3);
|
TMC_SAY_PWMTHRS(Z,Z3);
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
#if E_STEPPERS && AXIS_HAS_STEALTHCHOP(E0)
|
||||||
TMC_SAY_PWMTHRS_E(0);
|
TMC_SAY_PWMTHRS_E(0);
|
||||||
#endif
|
#endif
|
||||||
#if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
|
#if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
|
||||||
|
|
|
@ -370,6 +370,16 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if EXTRUDERS == 0
|
||||||
|
#undef DISTINCT_E_FACTORS
|
||||||
|
#undef SINGLENOZZLE
|
||||||
|
#undef SWITCHING_EXTRUDER
|
||||||
|
#undef SWITCHING_NOZZLE
|
||||||
|
#undef MIXING_EXTRUDER
|
||||||
|
#undef MK2_MULTIPLEXER
|
||||||
|
#undef PRUSA_MMU2
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
||||||
#if EXTRUDERS > 4
|
#if EXTRUDERS > 4
|
||||||
#define E_STEPPERS 3
|
#define E_STEPPERS 3
|
||||||
|
|
|
@ -43,6 +43,16 @@
|
||||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if EXTRUDERS == 0
|
||||||
|
#define NO_VOLUMETRICS
|
||||||
|
#undef FWRETRACT
|
||||||
|
#undef LIN_ADVANCE
|
||||||
|
#undef ADVANCED_PAUSE_FEATURE
|
||||||
|
#undef DISABLE_INACTIVE_EXTRUDER
|
||||||
|
#undef EXTRUDER_RUNOUT_PREVENT
|
||||||
|
#undef FILAMENT_LOAD_UNLOAD_GCODES
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HAS_CLASSIC_JERK (IS_KINEMATIC || DISABLED(JUNCTION_DEVIATION))
|
#define HAS_CLASSIC_JERK (IS_KINEMATIC || DISABLED(JUNCTION_DEVIATION))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -475,7 +475,7 @@ DEFINE_PIDTEMP_FUNCS(0);
|
||||||
#endif // E_STEPPERS > 4
|
#endif // E_STEPPERS > 4
|
||||||
#endif // E_STEPPERS > 3
|
#endif // E_STEPPERS > 3
|
||||||
#endif // E_STEPPERS > 2
|
#endif // E_STEPPERS > 2
|
||||||
#else
|
#elif E_STEPPERS
|
||||||
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
|
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ DEFINE_PIDTEMP_FUNCS(0);
|
||||||
#endif // E_STEPPERS > 4
|
#endif // E_STEPPERS > 4
|
||||||
#endif // E_STEPPERS > 3
|
#endif // E_STEPPERS > 3
|
||||||
#endif // E_STEPPERS > 2
|
#endif // E_STEPPERS > 2
|
||||||
#else
|
#elif E_STEPPERS
|
||||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ DEFINE_PIDTEMP_FUNCS(0);
|
||||||
#endif // E_STEPPERS > 4
|
#endif // E_STEPPERS > 4
|
||||||
#endif // E_STEPPERS > 3
|
#endif // E_STEPPERS > 3
|
||||||
#endif // E_STEPPERS > 2
|
#endif // E_STEPPERS > 2
|
||||||
#else
|
#elif E_STEPPERS
|
||||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -104,32 +104,34 @@ void _menu_temp_filament_op(const AdvancedPauseMode mode, const int8_t extruder)
|
||||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PREHEAT_CUSTOM, &thermalManager.target_temperature[_change_filament_temp_extruder], EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb);
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PREHEAT_CUSTOM, &thermalManager.target_temperature[_change_filament_temp_extruder], EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb);
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
void menu_temp_e0_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 0); }
|
#if E_STEPPERS
|
||||||
void menu_temp_e0_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 0); }
|
void menu_temp_e0_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 0); }
|
||||||
void menu_temp_e0_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 0); }
|
void menu_temp_e0_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 0); }
|
||||||
#if E_STEPPERS > 1
|
void menu_temp_e0_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 0); }
|
||||||
void menu_temp_e1_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 1); }
|
#if E_STEPPERS > 1
|
||||||
void menu_temp_e1_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 1); }
|
void menu_temp_e1_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 1); }
|
||||||
void menu_temp_e1_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 1); }
|
void menu_temp_e1_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 1); }
|
||||||
#if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
|
void menu_temp_e1_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 1); }
|
||||||
void menu_unload_filament_all_temp() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, -1); }
|
#if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
|
||||||
#endif
|
void menu_unload_filament_all_temp() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, -1); }
|
||||||
#if E_STEPPERS > 2
|
#endif
|
||||||
void menu_temp_e2_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 2); }
|
#if E_STEPPERS > 2
|
||||||
void menu_temp_e2_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 2); }
|
void menu_temp_e2_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 2); }
|
||||||
void menu_temp_e2_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 2); }
|
void menu_temp_e2_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 2); }
|
||||||
#if E_STEPPERS > 3
|
void menu_temp_e2_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 2); }
|
||||||
void menu_temp_e3_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 3); }
|
#if E_STEPPERS > 3
|
||||||
void menu_temp_e3_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 3); }
|
void menu_temp_e3_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 3); }
|
||||||
void menu_temp_e3_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 3); }
|
void menu_temp_e3_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 3); }
|
||||||
#if E_STEPPERS > 4
|
void menu_temp_e3_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 3); }
|
||||||
void menu_temp_e4_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 4); }
|
#if E_STEPPERS > 4
|
||||||
void menu_temp_e4_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 4); }
|
void menu_temp_e4_filament_change() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_PAUSE_PRINT, 4); }
|
||||||
void menu_temp_e4_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 4); }
|
void menu_temp_e4_filament_load() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_LOAD_FILAMENT, 4); }
|
||||||
#endif // E_STEPPERS > 4
|
void menu_temp_e4_filament_unload() { _menu_temp_filament_op(ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, 4); }
|
||||||
#endif // E_STEPPERS > 3
|
#endif // E_STEPPERS > 4
|
||||||
#endif // E_STEPPERS > 2
|
#endif // E_STEPPERS > 3
|
||||||
#endif // E_STEPPERS > 1
|
#endif // E_STEPPERS > 2
|
||||||
|
#endif // E_STEPPERS > 1
|
||||||
|
#endif // E_STEPPERS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -43,23 +43,25 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Refresh the E factor after changing flow
|
// Refresh the E factor after changing flow
|
||||||
void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
|
#if EXTRUDERS
|
||||||
#if EXTRUDERS > 1
|
void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
|
||||||
void _lcd_refresh_e_factor() { planner.refresh_e_factor(active_extruder); }
|
#if EXTRUDERS > 1
|
||||||
void _lcd_refresh_e_factor_1() { planner.refresh_e_factor(1); }
|
void _lcd_refresh_e_factor() { planner.refresh_e_factor(active_extruder); }
|
||||||
#if EXTRUDERS > 2
|
void _lcd_refresh_e_factor_1() { planner.refresh_e_factor(1); }
|
||||||
void _lcd_refresh_e_factor_2() { planner.refresh_e_factor(2); }
|
#if EXTRUDERS > 2
|
||||||
#if EXTRUDERS > 3
|
void _lcd_refresh_e_factor_2() { planner.refresh_e_factor(2); }
|
||||||
void _lcd_refresh_e_factor_3() { planner.refresh_e_factor(3); }
|
#if EXTRUDERS > 3
|
||||||
#if EXTRUDERS > 4
|
void _lcd_refresh_e_factor_3() { planner.refresh_e_factor(3); }
|
||||||
void _lcd_refresh_e_factor_4() { planner.refresh_e_factor(4); }
|
#if EXTRUDERS > 4
|
||||||
#if EXTRUDERS > 5
|
void _lcd_refresh_e_factor_4() { planner.refresh_e_factor(4); }
|
||||||
void _lcd_refresh_e_factor_5() { planner.refresh_e_factor(5); }
|
#if EXTRUDERS > 5
|
||||||
#endif // EXTRUDERS > 5
|
void _lcd_refresh_e_factor_5() { planner.refresh_e_factor(5); }
|
||||||
#endif // EXTRUDERS > 4
|
#endif // EXTRUDERS > 5
|
||||||
#endif // EXTRUDERS > 3
|
#endif // EXTRUDERS > 4
|
||||||
#endif // EXTRUDERS > 2
|
#endif // EXTRUDERS > 3
|
||||||
#endif // EXTRUDERS > 1
|
#endif // EXTRUDERS > 2
|
||||||
|
#endif // EXTRUDERS > 1
|
||||||
|
#endif // EXTRUDERS
|
||||||
|
|
||||||
#if ENABLED(BABYSTEPPING)
|
#if ENABLED(BABYSTEPPING)
|
||||||
|
|
||||||
|
@ -174,7 +176,7 @@ void menu_tune() {
|
||||||
//
|
//
|
||||||
#if EXTRUDERS == 1
|
#if EXTRUDERS == 1
|
||||||
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
|
||||||
#else // EXTRUDERS > 1
|
#elif EXTRUDERS
|
||||||
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
|
||||||
#define EDIT_FLOW(N) MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_LCD_N##N, &planner.flow_percentage[N], 10, 999, _lcd_refresh_e_factor_##N)
|
#define EDIT_FLOW(N) MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_LCD_N##N, &planner.flow_percentage[N], 10, 999, _lcd_refresh_e_factor_##N)
|
||||||
EDIT_FLOW(0);
|
EDIT_FLOW(0);
|
||||||
|
@ -191,7 +193,7 @@ void menu_tune() {
|
||||||
#endif // EXTRUDERS > 4
|
#endif // EXTRUDERS > 4
|
||||||
#endif // EXTRUDERS > 3
|
#endif // EXTRUDERS > 3
|
||||||
#endif // EXTRUDERS > 2
|
#endif // EXTRUDERS > 2
|
||||||
#endif // EXTRUDERS > 1
|
#endif // EXTRUDERS
|
||||||
|
|
||||||
//
|
//
|
||||||
// Babystep X:
|
// Babystep X:
|
||||||
|
|
|
@ -628,8 +628,12 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
||||||
#define NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0)
|
#define NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0)
|
||||||
#define REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0)
|
#define REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#elif E_STEPPERS
|
||||||
#define E_STEP_WRITE(E,V) E0_STEP_WRITE(V)
|
#define E_STEP_WRITE(E,V) E0_STEP_WRITE(V)
|
||||||
#define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR)
|
#define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR)
|
||||||
#define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR)
|
#define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR)
|
||||||
|
#else
|
||||||
|
#define E_STEP_WRITE(E,V) NOOP
|
||||||
|
#define NORM_E_DIR(E) NOOP
|
||||||
|
#define REV_E_DIR(E) NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -133,25 +133,28 @@
|
||||||
|| (ENABLED(SWITCHING_EXTRUDER) && E_STEPPERS > N) \
|
|| (ENABLED(SWITCHING_EXTRUDER) && E_STEPPERS > N) \
|
||||||
|| (DISABLED(SWITCHING_EXTRUDER) && DISABLED(MIXING_EXTRUDER) && EXTRUDERS > N)
|
|| (DISABLED(SWITCHING_EXTRUDER) && DISABLED(MIXING_EXTRUDER) && EXTRUDERS > N)
|
||||||
|
|
||||||
#if PIN_EXISTS(E0_CS)
|
#define _E0_CS
|
||||||
#define _E0_CS E0_CS_PIN,
|
#define _E0_MS1
|
||||||
#else
|
#define _E0_MS2
|
||||||
#define _E0_CS
|
#define _E0_MS3
|
||||||
#endif
|
|
||||||
#if PIN_EXISTS(E0_MS1)
|
#if E_NEEDED(0)
|
||||||
#define _E0_MS1 E0_MS1_PIN,
|
#if PIN_EXISTS(E0_CS)
|
||||||
#else
|
#undef _E0_CS
|
||||||
#define _E0_MS1
|
#define _E0_CS E0_CS_PIN,
|
||||||
#endif
|
#endif
|
||||||
#if PIN_EXISTS(E0_MS2)
|
#if PIN_EXISTS(E0_MS1)
|
||||||
#define _E0_MS2 E0_MS2_PIN,
|
#undef _E0_MS1
|
||||||
#else
|
#define _E0_MS1 E0_MS1_PIN,
|
||||||
#define _E0_MS2
|
#endif
|
||||||
#endif
|
#if PIN_EXISTS(E0_MS2)
|
||||||
#if PIN_EXISTS(E0_MS3)
|
#undef _E0_MS2
|
||||||
#define _E0_MS3 E0_MS3_PIN,
|
#define _E0_MS2 E0_MS2_PIN,
|
||||||
#else
|
#endif
|
||||||
#define _E0_MS3
|
#if PIN_EXISTS(E0_MS3)
|
||||||
|
#undef _E0_MS3
|
||||||
|
#define _E0_MS3 E0_MS3_PIN,
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _E1_CS
|
#define _E1_CS
|
||||||
|
@ -278,13 +281,18 @@
|
||||||
// E Steppers
|
// E Steppers
|
||||||
//
|
//
|
||||||
|
|
||||||
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, _E0_CS _E0_MS1 _E0_MS2 _E0_MS3
|
#define _E0_PINS
|
||||||
#define _E1_PINS
|
#define _E1_PINS
|
||||||
#define _E2_PINS
|
#define _E2_PINS
|
||||||
#define _E3_PINS
|
#define _E3_PINS
|
||||||
#define _E4_PINS
|
#define _E4_PINS
|
||||||
#define _E5_PINS
|
#define _E5_PINS
|
||||||
|
|
||||||
|
#if EXTRUDERS
|
||||||
|
#undef _E0_PINS
|
||||||
|
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, _E0_CS _E0_MS1 _E0_MS2 _E0_MS3
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SWITCHING_EXTRUDER)
|
#if ENABLED(SWITCHING_EXTRUDER)
|
||||||
// Tools 0 and 1 use E0
|
// Tools 0 and 1 use E0
|
||||||
#if EXTRUDERS > 2 // Tools 2 and 3 use E1
|
#if EXTRUDERS > 2 // Tools 2 and 3 use E1
|
||||||
|
@ -320,33 +328,37 @@
|
||||||
// Heaters, Fans, Temp Sensors
|
// Heaters, Fans, Temp Sensors
|
||||||
//
|
//
|
||||||
|
|
||||||
#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN),
|
#define _H0_PINS
|
||||||
#define _H1_PINS
|
#define _H1_PINS
|
||||||
#define _H2_PINS
|
#define _H2_PINS
|
||||||
#define _H3_PINS
|
#define _H3_PINS
|
||||||
#define _H4_PINS
|
#define _H4_PINS
|
||||||
#define _H5_PINS
|
#define _H5_PINS
|
||||||
|
|
||||||
#if HOTENDS > 1
|
#if HOTENDS
|
||||||
#undef _H1_PINS
|
#undef _H0_PINS
|
||||||
#define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN),
|
#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN),
|
||||||
#if HOTENDS > 2
|
#if HOTENDS > 1
|
||||||
#undef _H2_PINS
|
#undef _H1_PINS
|
||||||
#define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_2_PIN),
|
#define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN),
|
||||||
#if HOTENDS > 3
|
#if HOTENDS > 2
|
||||||
#undef _H3_PINS
|
#undef _H2_PINS
|
||||||
#define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_3_PIN),
|
#define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_2_PIN),
|
||||||
#if HOTENDS > 4
|
#if HOTENDS > 3
|
||||||
#undef _H4_PINS
|
#undef _H3_PINS
|
||||||
#define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_4_PIN),
|
#define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_3_PIN),
|
||||||
#if HOTENDS > 5
|
#if HOTENDS > 4
|
||||||
#undef _H5_PINS
|
#undef _H4_PINS
|
||||||
#define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_5_PIN),
|
#define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_4_PIN),
|
||||||
#endif // HOTENDS > 5
|
#if HOTENDS > 5
|
||||||
#endif // HOTENDS > 4
|
#undef _H5_PINS
|
||||||
#endif // HOTENDS > 3
|
#define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_5_PIN),
|
||||||
#endif // HOTENDS > 2
|
#endif // HOTENDS > 5
|
||||||
#endif // HOTENDS > 1
|
#endif // HOTENDS > 4
|
||||||
|
#endif // HOTENDS > 3
|
||||||
|
#endif // HOTENDS > 2
|
||||||
|
#endif // HOTENDS > 1
|
||||||
|
#endif // HOTENDS
|
||||||
|
|
||||||
#define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN),
|
#define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN),
|
||||||
|
|
||||||
|
|
Reference in a new issue