From 82a423154a1ca47e4a1ad7064b79a800443e7daa Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Mon, 25 Sep 2017 12:27:26 -0600 Subject: [PATCH] Adjustments for prototype lifting-nozzle extruder. --- Marlin/Conditionals_LulzBot.h | 7 ++++++- Marlin/Configuration.h | 10 ++++++---- Marlin/stepper_indirection.h | 6 +++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 95d3ba71d..4d8eea518 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -726,7 +726,12 @@ // 16 chars max ^^^^^^^^^^^^^^^ #define LULZBOT_M115_EXTRUDER_TYPE "ServoMcStruder" #define LULZBOT_NUM_SERVOS 1 + #define LULZBOT_SWITCHING_EXTRUDER_NO_REVERSE + #define LULZBOT_SWITCHING_EXTRUDER #define LULZBOT_SWITCHING_NOZZLE + #define LULZBOT_SWITCHING_SERVO_ANGLES { 0, 67 } + #undef LULZBOT_E_STEPS + #define LULZBOT_E_STEPS 420 #endif /* TOOLHEAD_Devel_ServoDual */ #if defined(TOOLHEAD_Yellowfin_DualExtruderV3) || defined(TOOLHEAD_Devel_ServoDual) @@ -1019,7 +1024,7 @@ // default steps per unit for LulzBot TAZ. -#if defined(LULZBOT_DISTINCT_E_FACTORS) && LULZBOT_EXTRUDERS == 2 +#if defined(LULZBOT_DISTINCT_E_FACTORS) && LULZBOT_EXTRUDERS == 2 && !defined(LULZBOT_SWITCHING_EXTRUDER) #define LULZBOT_DEFAULT_AXIS_STEPS_PER_UNIT {LULZBOT_XY_STEPS,LULZBOT_XY_STEPS,LULZBOT_Z_STEPS,LULZBOT_E_STEPS,LULZBOT_E_STEPS} #else #define LULZBOT_DEFAULT_AXIS_STEPS_PER_UNIT {LULZBOT_XY_STEPS,LULZBOT_XY_STEPS,LULZBOT_Z_STEPS,LULZBOT_E_STEPS} diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 21f1681d9..b1b8e67de 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -161,10 +161,12 @@ #endif // A dual extruder that uses a single stepper motor -//#define SWITCHING_EXTRUDER +#if defined(LULZBOT_SWITCHING_EXTRUDER) +#define SWITCHING_EXTRUDER +#endif #if ENABLED(SWITCHING_EXTRUDER) #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #define SWITCHING_EXTRUDER_SERVO_ANGLES LULZBOT_SWITCHING_SERVO_ANGLES // Angles for E0, E1[, E2, E3] #if EXTRUDERS > 3 #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 #endif @@ -172,11 +174,11 @@ // A dual-nozzle that uses a servomotor to raise/lower one of the nozzles #if defined(LULZBOT_SWITCHING_NOZZLE) -#define SWITCHING_NOZZLE +#define SWITCHING_NOZZLE LULZBOT_SWITCHING_NOZZLE #endif #if ENABLED(SWITCHING_NOZZLE) #define SWITCHING_NOZZLE_SERVO_NR 0 - #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 + #define SWITCHING_NOZZLE_SERVO_ANGLES LULZBOT_SWITCHING_SERVO_ANGLES // Angles for E0, E1 //#define HOTEND_OFFSET_Z { 0.0, 0.0 } #endif diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 8b8624641..1acbe68ff 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -416,7 +416,11 @@ * Extruder indirection for the single E axis */ #if ENABLED(SWITCHING_EXTRUDER) - #if EXTRUDERS == 2 + #if defined(LULZBOT_SWITCHING_EXTRUDER_NO_REVERSE) + #define E_STEP_WRITE(v) E0_STEP_WRITE(v) + #define NORM_E_DIR() E0_DIR_WRITE( INVERT_E0_DIR) + #define REV_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR) + #elif EXTRUDERS == 2 #define E_STEP_WRITE(v) E0_STEP_WRITE(v) #define NORM_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? INVERT_E0_DIR : !INVERT_E0_DIR) #define REV_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? !INVERT_E0_DIR : INVERT_E0_DIR)