From 56fa35d6a795a1287e215901d5fbfea8be4c1173 Mon Sep 17 00:00:00 2001 From: bmkahl Date: Thu, 1 Feb 2024 13:50:42 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Suport=20for=20TazDualZ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 23 ++++++++++++----------- Marlin/Configuration_adv.h | 24 +++++++++++++++--------- Marlin/src/gcode/calibrate/G34_M422.cpp | 7 +++++++ 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 54d3a20dc93f..365919c2d596 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -244,6 +244,7 @@ #define LULZBOT_BLTouch // <-- changed #define LULZBOT_FILAMENT_RUNOUT // <-- changed #define LULZBOT_WIPE + #define TazDualZ #elif ENABLED(Sidekick_289) #define CUSTOM_MACHINE_NAME "Taz SideKick 289" #define LULZBOT_LCD_MACHINE_NAME "SideKick 289" @@ -2163,7 +2164,9 @@ // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. -#if defined (LULZBOT_BLTouch) +#if ENABLED(LULZBOT_BLTouch, TazDualZ) + #define PROBING_MARGIN 5 +#elif ENABLED(LULZBOT_BLTouch) #define PROBING_MARGIN 50 #else #if ENABLED(MiniV2) @@ -2180,7 +2183,7 @@ #endif // X and Y axis travel speed (mm/min) between probes -#define XY_PROBE_FEEDRATE (100*60) +#define XY_PROBE_FEEDRATE (150*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) #if defined(LULZBOT_BLTouch) @@ -2412,7 +2415,7 @@ #else #define Y_HOME_DIR 1 #endif -#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, TAZProV2, Workhorse, Sidekick289, Sidekick747) +#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, Workhorse, Sidekick289, Sidekick747) #define Z_HOME_DIR 1 #else #define Z_HOME_DIR -1 @@ -2431,7 +2434,9 @@ */ //#define X_SAFETY_STOP //#define Y_SAFETY_STOP -//#define Z_SAFETY_STOP +#if ANY(Workhorse, TAZProV2, TazDualZ) + #define Z_SAFETY_STOP +#endif //#define I_SAFETY_STOP //#define J_SAFETY_STOP //#define K_SAFETY_STOP @@ -2901,11 +2906,7 @@ * The height can be set with M420 Z */ #define ENABLE_LEVELING_FADE_HEIGHT - #if ENABLED(BLTouch) - #define FADE_HEIGHT 10.0 - #else - #define FADE_HEIGHT 0.0 - #endif + #define FADE_HEIGHT 0.0 #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #define DEFAULT_LEVELING_FADE_HEIGHT FADE_HEIGHT // (mm) Default fade height. #endif @@ -3104,7 +3105,7 @@ * - Allows Z homing only when XY positions are known and trusted. * - If stepper drivers sleep, XY homing may be required again before Z homing. */ -#if ANY(TAZ6, Sidekick_289, Sidekick_747) +#if ANY(TAZ6, Sidekick_289, Sidekick_747, TAZProV2) #define Z_SAFE_HOMING #endif @@ -3112,7 +3113,7 @@ #if ENABLED(TAZ6) #define Z_SAFE_HOMING_X_POINT -20.1 // (mm) X point for Z homing #define Z_SAFE_HOMING_Y_POINT 259.5 // (mm) Y point for Z homing - #elif ANY(Sidekick_289, Sidekick_747) + #elif ANY(Sidekick_289, Sidekick_747, TAZProV2) #define Z_SAFE_HOMING_X_POINT (X_CENTER) // (mm) X point for Z homing #define Z_SAFE_HOMING_Y_POINT (Y_BED_SIZE/2) // (mm) Y point for Z homing //#define Z_SAFE_HOMING_POINT_ABSOLUTE // Ignore home offsets (M206) for Z homing position diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d4becfd958c5..b68185f37baa 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -335,8 +335,8 @@ * Thermal Protection parameters for the bed are just as above for hotends. */ #if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + #define THERMAL_PROTECTION_BED_PERIOD 60 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 3 // Degrees Celsius /** * As described above, except for the bed (M140/M190/M303). @@ -1051,7 +1051,13 @@ * If not defined, probe limits will be used. * Override with 'M422 S X Y'. */ - //#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } } + #if ANY(TAZPro, TAZProXT) && ENABLED(LULZBOT_BLTouch) + #define Z_STEPPER_ALIGN_XY { { 10, (Y_BED_SIZE / 2) }, { (X_BED_SIZE - 10 ), (Y_BED_SIZE / 2) } } + #elif ENABLED(TAZProV2) + #define Z_STEPPER_ALIGN_XY { { 10, (Y_BED_SIZE / 2) }, { (X_BED_SIZE - 10 ), (Y_BED_SIZE / 2) } } + #else + #define Z_STEPPER_ALIGN_XY { { -10, -9 }, { (X_BED_SIZE + 8), -9 } } + #endif /** * Orientation for the automatically-calculated probe positions. @@ -1089,13 +1095,13 @@ #ifndef Z_STEPPER_ALIGN_STEPPER_XY // Amplification factor. Used to scale the correction step up or down in case // the stepper (spindle) position is farther out than the test point. - #define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability! + #define Z_STEPPER_ALIGN_AMP 1 // Use a value > 1.0 NOTE: This may cause instability! #endif // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm - #define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle + #define G34_MAX_GRADE 15 // (%) Maximum incline that G34 will handle #define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment - #define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this + #define Z_STEPPER_ALIGN_ACC 0.05 // Stop iterating early if the accuracy is better than this #define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done? // After G34, re-home Z (G28 Z) or just calculate it from the last probe heights? // Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed. @@ -3445,7 +3451,7 @@ //#define STEALTHCHOP_U //#define STEALTHCHOP_V //#define STEALTHCHOP_W - #define STEALTHCHOP_E + //#define STEALTHCHOP_E #endif /** @@ -4467,7 +4473,7 @@ * Implemented as G34 because M915 is deprecated. * @section calibrate */ -#if ANY(MiniV2, MiniV3, Sidekick_289, Sidekick_747) +#if ANY(MiniV2, MiniV3, Sidekick_289, Sidekick_747) && DISABLED(TazDualZ) #define MECHANICAL_GANTRY_CALIBRATION #endif #if ENABLED(MECHANICAL_GANTRY_CALIBRATION) @@ -4491,7 +4497,7 @@ #define GANTRY_CALIBRATION_COMMANDS_POST "G28" #endif -#if ANY(TAZPro,TAZProXT,Workhorse) +#if ANY(TAZPro,TAZProXT,Workhorse) && DISABLED(TazDualZ) #define X_LEVEL_SEQUENCE #endif #if defined (X_LEVEL_SEQUENCE) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index bbc403904f66..d9ebf406dda0 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -238,6 +238,13 @@ void GcodeSuite::G34() { z_maxdiff = z_measured_max - z_measured_min; z_probe = (Z_TWEEN_SAFE_CLEARANCE + zoffs) + z_measured_max + z_maxdiff; //Not sure we need z_maxdiff, but leaving it in for safety. + SERIAL_ECHOLNPGM( + LIST_N(DOUBLE(NUM_Z_STEPPERS), + "Calculated Z1=", z_measured[0], + " Z2=", z_measured[1] + ) + ); + #if HAS_Z_STEPPER_ALIGN_STEPPER_XY // Replace the initial values in z_measured with calculated heights at // each stepper position. This allows the adjustment algorithm to be