Skip to content

Commit

Permalink
✨ Suport for TazDualZ
Browse files Browse the repository at this point in the history
  • Loading branch information
bmkahl committed Feb 1, 2024
1 parent de6fa70 commit 56fa35d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
23 changes: 12 additions & 11 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -2901,11 +2906,7 @@
* The height can be set with M420 Z<height>
*/
#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
Expand Down Expand Up @@ -3104,15 +3105,15 @@
* - 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

#if ENABLED(Z_SAFE_HOMING)
#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
Expand Down
24 changes: 15 additions & 9 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -1051,7 +1051,13 @@
* If not defined, probe limits will be used.
* Override with 'M422 S<index> X<pos> Y<pos>'.
*/
//#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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -3445,7 +3451,7 @@
//#define STEALTHCHOP_U
//#define STEALTHCHOP_V
//#define STEALTHCHOP_W
#define STEALTHCHOP_E
//#define STEALTHCHOP_E
#endif

/**
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/gcode/calibrate/G34_M422.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56fa35d

Please sign in to comment.