|
624 | 624 | #undef MIXING_EXTRUDER
|
625 | 625 | #undef HOTEND_IDLE_TIMEOUT
|
626 | 626 | #undef DISABLE_E
|
627 |
| - #undef THERMAL_PROTECTION_HOTENDS |
628 |
| - #undef PREVENT_COLD_EXTRUSION |
629 | 627 | #undef PREVENT_LENGTHY_EXTRUDE
|
630 | 628 | #undef FILAMENT_RUNOUT_SENSOR
|
631 | 629 | #undef FILAMENT_RUNOUT_DISTANCE_MM
|
|
657 | 655 | #else
|
658 | 656 | #define E_STEPPERS 1
|
659 | 657 | #endif
|
660 |
| - #if !HAS_SWITCHING_NOZZLE |
661 |
| - #define HOTENDS E_STEPPERS |
662 |
| - #endif |
663 | 658 |
|
664 | 659 | #elif ENABLED(MIXING_EXTRUDER) // Multiple feeds are mixed proportionally
|
665 | 660 |
|
|
691 | 686 | #define SINGLENOZZLE
|
692 | 687 | #endif
|
693 | 688 |
|
694 |
| -#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset |
695 |
| - #undef HOTENDS |
696 |
| - #define HOTENDS 1 |
697 |
| - #undef HOTEND_OFFSET_X |
698 |
| - #undef HOTEND_OFFSET_Y |
699 |
| -#endif |
700 |
| - |
701 |
| -#ifndef HOTENDS |
702 |
| - #define HOTENDS EXTRUDERS |
703 |
| -#endif |
| 689 | +// Default E steppers / manual motion is one per extruder |
704 | 690 | #ifndef E_STEPPERS
|
705 | 691 | #define E_STEPPERS EXTRUDERS
|
706 | 692 | #endif
|
707 | 693 | #ifndef E_MANUAL
|
708 | 694 | #define E_MANUAL EXTRUDERS
|
709 | 695 | #endif
|
710 | 696 |
|
| 697 | +// Number of hotends... |
| 698 | +#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // Only one for singlenozzle or mixing extruder |
| 699 | + #define HOTENDS 1 |
| 700 | +#elif HAS_SWITCHING_EXTRUDER && !HAS_SWITCHING_NOZZLE // One for each pair of abstract "extruders" |
| 701 | + #define HOTENDS E_STEPPERS |
| 702 | +#elif TEMP_SENSOR_0 |
| 703 | + #define HOTENDS EXTRUDERS // One per extruder if at least one heater exists |
| 704 | +#else |
| 705 | + #define HOTENDS 0 // A machine with no hotends at all can still extrude |
| 706 | +#endif |
| 707 | + |
| 708 | +// More than one hotend... |
| 709 | +#if HOTENDS > 1 |
| 710 | + #define HAS_MULTI_HOTEND 1 |
| 711 | + #define HAS_HOTEND_OFFSET 1 |
| 712 | + #ifndef HOTEND_OFFSET_X |
| 713 | + #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder |
| 714 | + #endif |
| 715 | + #ifndef HOTEND_OFFSET_Y |
| 716 | + #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder |
| 717 | + #endif |
| 718 | + #ifndef HOTEND_OFFSET_Z |
| 719 | + #define HOTEND_OFFSET_Z { 0 } // Z offsets for each extruder |
| 720 | + #endif |
| 721 | +#else |
| 722 | + #undef HOTEND_OFFSET_X |
| 723 | + #undef HOTEND_OFFSET_Y |
| 724 | + #undef HOTEND_OFFSET_Z |
| 725 | +#endif |
| 726 | + |
| 727 | +// At least one hotend... |
| 728 | +#if HOTENDS |
| 729 | + #define HAS_HOTEND 1 |
| 730 | + #ifndef HOTEND_OVERSHOOT |
| 731 | + #define HOTEND_OVERSHOOT 15 |
| 732 | + #endif |
| 733 | +#endif |
| 734 | + |
| 735 | +// Clean up E-stepper-based settings... |
711 | 736 | #if E_STEPPERS <= 7
|
712 | 737 | #undef INVERT_E7_DIR
|
713 | 738 | #undef E7_DRIVER_TYPE
|
|
1037 | 1062 | #define E_INDEX_N(E) 0
|
1038 | 1063 | #endif
|
1039 | 1064 |
|
1040 |
| -#if HOTENDS |
1041 |
| - #define HAS_HOTEND 1 |
1042 |
| - #ifndef HOTEND_OVERSHOOT |
1043 |
| - #define HOTEND_OVERSHOOT 15 |
1044 |
| - #endif |
1045 |
| - #if HOTENDS > 1 |
1046 |
| - #define HAS_MULTI_HOTEND 1 |
1047 |
| - #define HAS_HOTEND_OFFSET 1 |
1048 |
| - #endif |
1049 |
| -#else |
1050 |
| - #undef PID_PARAMS_PER_HOTEND |
1051 |
| -#endif |
1052 |
| - |
1053 | 1065 | // Helper macros for extruder and hotend arrays
|
1054 | 1066 | #define _EXTRUDER_LOOP(E) for (int8_t E = 0; E < EXTRUDERS; E++)
|
1055 | 1067 | #define EXTRUDER_LOOP() _EXTRUDER_LOOP(e)
|
|
1061 | 1073 | #define ARRAY_BY_HOTENDS(V...) ARRAY_N(HOTENDS, V)
|
1062 | 1074 | #define ARRAY_BY_HOTENDS1(v1) ARRAY_N_1(HOTENDS, v1)
|
1063 | 1075 |
|
1064 |
| -/** |
1065 |
| - * Default hotend offsets, if not defined |
1066 |
| - */ |
1067 |
| -#if HAS_HOTEND_OFFSET |
1068 |
| - #ifndef HOTEND_OFFSET_X |
1069 |
| - #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder |
1070 |
| - #endif |
1071 |
| - #ifndef HOTEND_OFFSET_Y |
1072 |
| - #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder |
1073 |
| - #endif |
1074 |
| - #ifndef HOTEND_OFFSET_Z |
1075 |
| - #define HOTEND_OFFSET_Z { 0 } // Z offsets for each extruder |
1076 |
| - #endif |
1077 |
| -#endif |
1078 |
| - |
1079 | 1076 | /**
|
1080 | 1077 | * Disable unused SINGLENOZZLE sub-options
|
1081 | 1078 | */
|
|
0 commit comments