From 260bbb310964ffdcfb2ad8b3715f1fa9211a8930 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 20 Jul 2016 10:24:33 -0700 Subject: [PATCH 1/4] Fix a couple of simple typos --- Marlin/SanityCheck.h | 2 +- Marlin/stepper_indirection.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 174f3b430..b183d0bf7 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -175,7 +175,7 @@ */ #if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(DUAL_X_CARRIAGE) - #error "SINGLENOZZLE and DUAL_X_CARRIAGE are incompatible." + #error "SWITCHING_EXTRUDER and DUAL_X_CARRIAGE are incompatible." #elif EXTRUDERS != 2 #error "SWITCHING_EXTRUDER requires exactly 2 EXTRUDERS." #elif NUM_SERVOS < 1 diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 65fde23c1..08d33b176 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -72,7 +72,7 @@ #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE) #define X2_ENABLE_READ READ(X_ENABLE_PIN) -#endif // DUAL_X_CARRIAGE +#endif // Y motor #define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN) From 91777dd76c34ac742ba29c60fdfa774d17ea06ac Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 20 Jul 2016 10:25:06 -0700 Subject: [PATCH 2/4] Add DUAL_NOZZLE_DUPLICATION_MODE option --- Marlin/Configuration_adv.h | 5 ++++- Marlin/SanityCheck.h | 17 +++++++++++++++++ .../Cartesio/Configuration_adv.h | 5 ++++- .../Felix/Configuration_adv.h | 5 ++++- .../Hephestos/Configuration_adv.h | 5 ++++- .../Hephestos_2/Configuration_adv.h | 5 ++++- .../K8200/Configuration_adv.h | 5 ++++- .../K8400/Configuration_adv.h | 5 ++++- .../RigidBot/Configuration_adv.h | 5 ++++- .../SCARA/Configuration_adv.h | 5 ++++- .../TAZ4/Configuration_adv.h | 5 ++++- .../WITBOX/Configuration_adv.h | 5 ++++- .../delta/biv2.5/Configuration_adv.h | 5 ++++- .../delta/generic/Configuration_adv.h | 5 ++++- .../delta/kossel_mini/Configuration_adv.h | 5 ++++- .../delta/kossel_pro/Configuration_adv.h | 5 ++++- .../delta/kossel_xl/Configuration_adv.h | 5 ++++- .../makibox/Configuration_adv.h | 5 ++++- .../tvrrug/Round2/Configuration_adv.h | 5 ++++- 19 files changed, 89 insertions(+), 18 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 930e931d3..c8d657739 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index b183d0bf7..5eea066a6 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -572,6 +572,23 @@ #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT." #endif +/** + * Basic 2-nozzle duplication mode + */ +#if ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) + #if HOTENDS != 2 + #error "DUAL_NOZZLE_DUPLICATION_MODE requires exactly 2 hotends." + #elif ENABLED(DUAL_X_CARRIAGE) + #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with DUAL_X_CARRIAGE." + #elif ENABLED(SINGLENOZZLE) + #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SINGLENOZZLE." + #elif ENABLED(MIXING_EXTRUDER) + #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with MIXING_EXTRUDER." + #elif ENABLED(SWITCHING_EXTRUDER) + #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SWITCHING_EXTRUDER." + #endif +#endif + /** * Test Extruder Pins */ diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 9207b5703..86a14793c 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 3f0729b6c..d4eed80f3 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index af6bce805..6dc51d6b1 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index bfb6b16c7..501541bd9 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 3703ce1cc..a822c9bf5 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -335,7 +335,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index 11fdbdb3c..8b0fd6d38 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 3c0968260..c2fcf9268 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 6a0dea802..42045d7b8 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index fe9b6ba36..9a7dcf602 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -337,7 +337,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index af6bce805..6dc51d6b1 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 173cacf4d..9dc856be7 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 51a2d2b0b..66877a67e 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 90b3c68f0..24cf11fab 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index b8b94f8d4..6ee22d84a 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -334,7 +334,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 74bb7c5dc..bd5577078 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 6e8c6e671..9413d9b0c 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index f72daabc8..752c24f69 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -329,7 +329,10 @@ #define AXIS_RELATIVE_MODES {false, false, false, false} -//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false From cbc7f22ad92597258dceff26b0e59ebd5f71c85c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 20 Jul 2016 10:30:10 -0700 Subject: [PATCH 3/4] Implement DUAL_NOZZLE_DUPLICATION_MODE --- Marlin/Marlin.h | 2 +- Marlin/Marlin_main.cpp | 35 ++++++++++++++++++++++++++--------- Marlin/language.h | 1 + Marlin/stepper_indirection.h | 2 +- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 4a07513b0..271948969 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -134,7 +134,7 @@ void idle( void manage_inactivity(bool ignore_stepper_queue = false); -#if ENABLED(DUAL_X_CARRIAGE) +#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) extern bool extruder_duplication_enabled; #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 3e2c641ac..2966162dc 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1392,6 +1392,10 @@ XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH); XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM); XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); +#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) + bool extruder_duplication_enabled = false; // Used in Dual X mode 2 +#endif + #if ENABLED(DUAL_X_CARRIAGE) #define DXC_FULL_CONTROL_MODE 0 @@ -1423,7 +1427,6 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); static millis_t delayed_move_time = 0; // used in mode 1 static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2 static float duplicate_extruder_temp_offset = 0; // used in mode 2 - bool extruder_duplication_enabled = false; // used in mode 2 #endif //DUAL_X_CARRIAGE @@ -2820,12 +2823,13 @@ inline void gcode_G4() { current_position[X_AXIS] = current_position[Y_AXIS] = 0.0; sync_plan_position(); - #if ENABLED(DUAL_X_CARRIAGE) - int x_axis_home_dir = x_home_dir(active_extruder); - extruder_duplication_enabled = false; - #else - int x_axis_home_dir = home_dir(X_AXIS); - #endif + int x_axis_home_dir = + #if ENABLED(DUAL_X_CARRIAGE) + x_home_dir(active_extruder) + #else + home_dir(X_AXIS) + #endif + ; float mlx = max_length(X_AXIS), mly = max_length(Y_AXIS), @@ -2878,6 +2882,10 @@ inline void gcode_G28() { tool_change(0, 0, true); #endif + #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) + extruder_duplication_enabled = false; + #endif + /** * For mesh bed leveling deactivate the mesh calculations, will be turned * on again when homing all axis @@ -2996,7 +3004,6 @@ inline void gcode_G28() { if (home_all_axis || homeX) { #if ENABLED(DUAL_X_CARRIAGE) int tmp_extruder = active_extruder; - extruder_duplication_enabled = false; active_extruder = !active_extruder; HOMEAXIS(X); inactive_extruder_x_pos = current_position[X_AXIS]; @@ -6473,7 +6480,17 @@ inline void gcode_M503() { delayed_move_time = 0; } -#endif // DUAL_X_CARRIAGE +#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) + + inline void gcode_M605() { + stepper.synchronize(); + extruder_duplication_enabled = code_seen('S') && code_value_int() == 2; + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF); + SERIAL_EOL; + } + +#endif // M605 #if ENABLED(LIN_ADVANCE) /** diff --git a/Marlin/language.h b/Marlin/language.h index 093368333..4e53c4890 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -159,6 +159,7 @@ #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" #define MSG_HOTEND_OFFSET "Hotend offsets:" +#define MSG_DUPLICATION_MODE "Duplication mode: " #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir " #define MSG_SD_INIT_FAIL "SD init fail" diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 08d33b176..b14dde795 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -195,7 +195,7 @@ #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); } } #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(INVERT_E2_DIR); } } #elif EXTRUDERS > 1 - #if DISABLED(DUAL_X_CARRIAGE) + #if DISABLED(DUAL_X_CARRIAGE) && DISABLED(DUAL_NOZZLE_DUPLICATION_MODE) #define E_STEP_WRITE(v) { if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } #define NORM_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } #define REV_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } From b5a9647fec067c048fdfa3e9f5ec900c5b45f08d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 22 Jul 2016 16:26:06 -0700 Subject: [PATCH 4/4] Use `ENABLED` in `stepper_indirection.h` --- Marlin/stepper_indirection.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index b14dde795..4052e395f 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -195,14 +195,14 @@ #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); } } #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(INVERT_E2_DIR); } } #elif EXTRUDERS > 1 - #if DISABLED(DUAL_X_CARRIAGE) && DISABLED(DUAL_NOZZLE_DUPLICATION_MODE) - #define E_STEP_WRITE(v) { if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } - #define NORM_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } - #define REV_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } - #else + #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) #define E_STEP_WRITE(v) { if (extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } #define NORM_E_DIR() { if (extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } #define REV_E_DIR() { if (extruder_duplication_enabled) { E0_DIR_WRITE(INVERT_E0_DIR); E1_DIR_WRITE(INVERT_E1_DIR); } else if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } + #else + #define E_STEP_WRITE(v) { if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } + #define NORM_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } + #define REV_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } #endif #elif ENABLED(MIXING_EXTRUDER) #define E_STEP_WRITE(v) NOOP /* not used for mixing extruders! */