Skip to content

Commit a8f0e2a

Browse files
committed
Merge remote-tracking branch 'official/1.1.x' into 1.1.x
2 parents 023591b + 452c057 commit a8f0e2a

File tree

66 files changed

+238
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+238
-136
lines changed

.github/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x
132132

133133
* Use the present tense ("Add feature" not "Added feature").
134134
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
135-
* Limit the first line to 72 characters or less.
135+
* Limit the first line to 72 characters or fewer.
136136
* Reference issues and Pull Requests liberally after the first line.
137137

138138
### C++ Coding Standards

Marlin/Conditionals_post.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@
6868
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
6969
#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
7070

71+
/**
72+
* Dual X Carriage
73+
*/
74+
#if ENABLED(DUAL_X_CARRIAGE)
75+
#ifndef X1_MIN_POS
76+
#define X1_MIN_POS X_MIN_POS
77+
#endif
78+
#ifndef X1_MAX_POS
79+
#define X1_MAX_POS X_BED_SIZE
80+
#endif
81+
#endif
82+
7183
/**
7284
* CoreXY, CoreXZ, and CoreYZ - and their reverse
7385
*/
@@ -416,7 +428,7 @@
416428
#define MINIMUM_STEPPER_DIR_DELAY 500
417429
#elif HAS_DRIVER(A4988)
418430
#define MINIMUM_STEPPER_DIR_DELAY 200
419-
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
431+
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
420432
#define MINIMUM_STEPPER_DIR_DELAY 20
421433
#else
422434
#define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
@@ -432,7 +444,7 @@
432444
#define MINIMUM_STEPPER_PULSE 2
433445
#elif HAS_DRIVER(A4988) || HAS_DRIVER(LV8729)
434446
#define MINIMUM_STEPPER_PULSE 1
435-
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
447+
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
436448
#define MINIMUM_STEPPER_PULSE 0
437449
#else
438450
#define MINIMUM_STEPPER_PULSE 2
@@ -448,7 +460,7 @@
448460
#define MAXIMUM_STEPPER_RATE 150000
449461
#elif HAS_DRIVER(DRV8825)
450462
#define MAXIMUM_STEPPER_RATE 250000
451-
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
463+
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
452464
#define MAXIMUM_STEPPER_RATE 400000
453465
#elif HAS_DRIVER(A4988)
454466
#define MAXIMUM_STEPPER_RATE 500000
@@ -719,9 +731,9 @@
719731

720732
// Trinamic Stepper Drivers
721733
#define HAS_STEALTHCHOP (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208))
722-
#define HAS_STALLGUARD (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2660))
734+
#define HAS_STALLGUARD HAS_DRIVER(TMC2130)
723735
#define AXIS_HAS_STEALTHCHOP(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2208) )
724-
#define AXIS_HAS_STALLGUARD(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2660) )
736+
#define AXIS_HAS_STALLGUARD(ST) AXIS_DRIVER_TYPE(ST, TMC2130)
725737

726738
#if ENABLED(SENSORLESS_HOMING)
727739
// Disable Z axis sensorless homing if a probe is used to home the Z axis

Marlin/Configuration_adv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@
340340
// Configuration for second X-carriage
341341
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
342342
// the second x-carriage always homes to the maximum endstop.
343+
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
344+
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
343345
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
344346
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
345347
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position

Marlin/MarlinConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
#include "boards.h"
2727
#include "macros.h"
28-
#include "drivers.h"
2928
#include "Version.h"
3029
#include "Configuration.h"
3130
#include "Conditionals_LCD.h"
31+
#include "drivers.h"
3232
#include "Configuration_adv.h"
3333

3434
#if USE_MARLINSERIAL

Marlin/Marlin_main.cpp

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ bool get_target_extruder_from_command(const uint16_t code) {
13331333
if (axis == X_AXIS) {
13341334

13351335
// In Dual X mode hotend_offset[X] is T1's home position
1336-
float dual_max_x = MAX(hotend_offset[X_AXIS][1], X2_MAX_POS);
1336+
const float dual_max_x = MAX(hotend_offset[X_AXIS][1], X2_MAX_POS);
13371337

13381338
if (active_extruder != 0) {
13391339
// T1 can move from X2_MIN_POS to X2_MAX_POS or X2 home position (whichever is larger)
@@ -5675,7 +5675,7 @@ void home_all_axes() { gcode_G28(true); }
56755675
#endif
56765676
}
56775677

5678-
#if HAS_BED_PROBE
5678+
#if HAS_BED_PROBE && ENABLED(ULTIPANEL)
56795679
static float probe_z_shift(const float center) {
56805680
STOW_PROBE();
56815681
endstops.enable_z_probe(false);
@@ -6059,7 +6059,7 @@ void home_all_axes() { gcode_G28(true); }
60596059

60606060
switch (probe_points) {
60616061
case -1:
6062-
#if HAS_BED_PROBE
6062+
#if HAS_BED_PROBE && ENABLED(ULTIPANEL)
60636063
zprobe_zoffset += probe_z_shift(z_at_pt[CEN]);
60646064
#endif
60656065

@@ -10934,7 +10934,7 @@ inline void gcode_M502() {
1093410934
#if ENABLED(MAX7219_GCODE)
1093510935
/**
1093610936
* M7219: Control the Max7219 LED matrix
10937-
*
10937+
*
1093810938
* I - Initialize (clear) the matrix
1093910939
* F - Fill the matrix (set all bits)
1094010940
* P - Dump the LEDs[] array values
@@ -10943,7 +10943,7 @@ inline void gcode_M502() {
1094310943
* X<pos> - X position of an LED to set or toggle
1094410944
* Y<pos> - Y position of an LED to set or toggle
1094510945
* V<value> - The potentially 32-bit value or on/off state to set
10946-
* (for example: a chain of 4 Max7219 devices can have 32 bit
10946+
* (for example: a chain of 4 Max7219 devices can have 32 bit
1094710947
* rows or columns depending upon rotation)
1094810948
*/
1094910949
inline void gcode_M7219() {
@@ -12052,9 +12052,6 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
1205212052
#endif
1205312053
}
1205412054

12055-
// Save current position to destination, for use later
12056-
set_destination_from_current();
12057-
1205812055
#if HAS_LEVELING
1205912056
// Set current position to the physical position
1206012057
const bool leveling_was_active = planner.leveling_active;
@@ -12063,10 +12060,23 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
1206312060

1206412061
#if ENABLED(DUAL_X_CARRIAGE)
1206512062

12063+
#if HAS_SOFTWARE_ENDSTOPS
12064+
// Update the X software endstops early
12065+
active_extruder = tmp_extruder;
12066+
update_software_endstops(X_AXIS);
12067+
active_extruder = !tmp_extruder;
12068+
#endif
12069+
12070+
// Don't move the new extruder out of bounds
12071+
if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
12072+
no_move = true;
12073+
12074+
if (!no_move) set_destination_from_current();
1206612075
dualx_tool_change(tmp_extruder, no_move); // Can modify no_move
1206712076

1206812077
#else // !DUAL_X_CARRIAGE
1206912078

12079+
set_destination_from_current();
1207012080
#if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder
1207112081
parking_extruder_tool_change(tmp_extruder, no_move);
1207212082
#endif
@@ -12152,6 +12162,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
1215212162

1215312163
feedrate_mm_s = old_feedrate_mm_s;
1215412164

12165+
#if HAS_SOFTWARE_ENDSTOPS && ENABLED(DUAL_X_CARRIAGE)
12166+
update_software_endstops(X_AXIS);
12167+
#endif
12168+
1215512169
#else // HOTENDS <= 1
1215612170

1215712171
UNUSED(fr_mm_s);

Marlin/Max7219_Debug_LEDs.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* support functions available to control the LEDs in the 8x8 grid.
3636
*
3737
* If you are using the Max7219 matrix for firmware debug purposes in time sensitive
38-
* areas of the code, please be aware that the orientation (rotation) of the display can
38+
* areas of the code, please be aware that the orientation (rotation) of the display can
3939
* affect the speed. The Max7219 can update a single column fairly fast. It is much
4040
* faster to do a Max7219_Set_Column() with a rotation of 90 or 270 degrees than to do
4141
* a Max7219_Set_Row(). The opposite is true for rotations of 0 or 180 degrees.
@@ -107,8 +107,8 @@ void Max7219_idle_tasks();
107107
#define MAX7219_X_LEDS (8 * MAX7219_NUMBER_UNITS)
108108
#define MAX7219_Y_LEDS 8
109109
#define XOR_7219(x, y) LEDs[y + (x >> 3) * 8] ^= _BV(7 - (x & 0x07))
110-
#define SET_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] |= _BV(7 - (x & 0x07))
111-
#define CLEAR_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] &= (_BV(7 - (x & 0x07)) ^ 0xff)
110+
#define SET_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] |= _BV(7 - (x & 0x07))
111+
#define CLEAR_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] &= (_BV(7 - (x & 0x07)) ^ 0xFF)
112112
#define BIT_7219(x, y) TEST(LEDs[y + (x >> 3) * 8], 7 - (x & 0x07))
113113
#define SEND_7219(R) do{ for (int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit0 + (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); }while(0)
114114
#elif _ROT == 90
@@ -117,16 +117,16 @@ void Max7219_idle_tasks();
117117
#define MAX7219_Y_LEDS (8 * MAX7219_NUMBER_UNITS)
118118
#define XOR_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] ^= _BV((y & 0x7))
119119
#define SET_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] |= _BV((y & 0x7))
120-
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] &= (_BV((y & 0x7)) ^ 0xff)
120+
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] &= (_BV((y & 0x7)) ^ 0xFF)
121121
#define BIT_7219(x, y) TEST(LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)], (y & 0x7))
122122
#define SEND_7219(R) do{ for (int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit0 + (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); }while(0)
123123
#elif _ROT == 180
124124
#define MAX7219_UPDATE_AXIS y // Fast line update axis for this orientation of the matrix display
125125
#define MAX7219_X_LEDS (8 * MAX7219_NUMBER_UNITS)
126126
#define MAX7219_Y_LEDS 8
127127
#define XOR_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] ^= _BV((x & 0x07))
128-
#define SET_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] |= _BV((x & 0x07))
129-
#define CLEAR_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] &= (_BV((x & 0x07)) ^ 0xff)
128+
#define SET_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] |= _BV((x & 0x07))
129+
#define CLEAR_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] &= (_BV((x & 0x07)) ^ 0xFF)
130130
#define BIT_7219(x, y) TEST(LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8], ((x & 0x07)))
131131
#define SEND_7219(R) do{ for (int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit7 - (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); }while(0)
132132
#elif _ROT == 270
@@ -135,7 +135,7 @@ void Max7219_idle_tasks();
135135
#define MAX7219_Y_LEDS (8 * MAX7219_NUMBER_UNITS)
136136
#define XOR_7219(x, y) LEDs[x + (y >> 3) * 8] ^= _BV(7 - (y & 0x7))
137137
#define SET_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] |= _BV(7 - (y & 0x7))
138-
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] &= (_BV(7 - (y & 0x7)) ^ 0xff)
138+
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] &= (_BV(7 - (y & 0x7)) ^ 0xFF)
139139
#define BIT_7219(x, y) TEST(LEDs[x + ( y >> 3) * 8], 7 - (y & 0x7))
140140
#define SEND_7219(R) do{ for (int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit7 - (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); }while(0)
141141
#else

Marlin/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
15231523
#endif
15241524
#if ENABLED(STEALTHCHOP) && !HAS_STEALTHCHOP
15251525
#error "STEALTHCHOP requires TMC2130 or TMC2208 stepper drivers."
1526-
#endif
1526+
#endif
15271527

15281528
/**
15291529
* Digipot requirement

Marlin/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* Marlin release version identifier
3737
*/
38-
#define SHORT_BUILD_VERSION "1.1.9"
38+
#define SHORT_BUILD_VERSION "bugfix-1.1.x"
3939

4040
/**
4141
* Verbose version identifier which should contain a reference to the location

Marlin/configuration_store.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,8 +2219,8 @@ void MarlinSettings::reset() {
22192219
SERIAL_ECHOPAIR("EEPROM can hold ", calc_num_meshes());
22202220
SERIAL_ECHOLNPGM(" meshes.\n");
22212221
}
2222-
2223-
// ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)
2222+
2223+
//ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)
22242224
// solution needs to be found.
22252225
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
22262226

Marlin/drivers.h

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,47 +45,14 @@
4545
#define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T)
4646
#define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T)
4747
#define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T)
48-
49-
#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)
50-
#define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T)
51-
#else
52-
#define AXIS_DRIVER_TYPE_X2(T) false
53-
#endif
54-
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
55-
#define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T)
56-
#else
57-
#define AXIS_DRIVER_TYPE_Y2(T) false
58-
#endif
59-
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
60-
#define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T)
61-
#else
62-
#define AXIS_DRIVER_TYPE_Z2(T) false
63-
#endif
64-
#if E_STEPPERS > 0
65-
#define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T)
66-
#else
67-
#define AXIS_DRIVER_TYPE_E0(T) false
68-
#endif
69-
#if E_STEPPERS > 1
70-
#define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T)
71-
#else
72-
#define AXIS_DRIVER_TYPE_E1(T) false
73-
#endif
74-
#if E_STEPPERS > 2
75-
#define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T)
76-
#else
77-
#define AXIS_DRIVER_TYPE_E2(T) false
78-
#endif
79-
#if E_STEPPERS > 3
80-
#define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T)
81-
#else
82-
#define AXIS_DRIVER_TYPE_E3(T) false
83-
#endif
84-
#if E_STEPPERS > 4
85-
#define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T)
86-
#else
87-
#define AXIS_DRIVER_TYPE_E4(T) false
88-
#endif
48+
#define AXIS_DRIVER_TYPE_X2(T) (ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && AXIS_DRIVER_TYPE(X2,T)
49+
#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Y2,T))
50+
#define AXIS_DRIVER_TYPE_Z2(T) (ENABLED(Z_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Z2,T))
51+
#define AXIS_DRIVER_TYPE_E0(T) (E_STEPPERS > 0 && AXIS_DRIVER_TYPE(E0,T))
52+
#define AXIS_DRIVER_TYPE_E1(T) (E_STEPPERS > 1 && AXIS_DRIVER_TYPE(E1,T))
53+
#define AXIS_DRIVER_TYPE_E2(T) (E_STEPPERS > 2 && AXIS_DRIVER_TYPE(E2,T))
54+
#define AXIS_DRIVER_TYPE_E3(T) (E_STEPPERS > 3 && AXIS_DRIVER_TYPE(E3,T))
55+
#define AXIS_DRIVER_TYPE_E4(T) (E_STEPPERS > 4 && AXIS_DRIVER_TYPE(E4,T))
8956

9057
#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \
9158
AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \
@@ -96,7 +63,7 @@
9663

9764
// Test for supported TMC drivers that require advanced configuration
9865
// Does not match standalone configurations
99-
#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) )
66+
#define HAS_TRINAMIC (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208))
10067

10168
#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \
10269
AXIS_DRIVER_TYPE_##A(TMC2208) || \

Marlin/endstops.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,13 @@ void Endstops::not_homing() {
229229
#endif
230230
}
231231

232-
// If the last move failed to trigger an endstop, call kill
233-
void Endstops::validate_homing_move() {
234-
if (trigger_state()) hit_on_purpose();
235-
else kill(PSTR(MSG_ERR_HOMING_FAILED));
236-
}
232+
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
233+
// If the last move failed to trigger an endstop, call kill
234+
void Endstops::validate_homing_move() {
235+
if (trigger_state()) hit_on_purpose();
236+
else kill(PSTR(MSG_ERR_HOMING_FAILED));
237+
}
238+
#endif
237239

238240
// Enable / disable endstop z-probe checking
239241
#if HAS_BED_PROBE

Marlin/endstops.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#include "MarlinConfig.h"
3131

32+
#define VALIDATE_HOMING_ENDSTOPS
33+
3234
enum EndstopEnum : char {
3335
X_MIN,
3436
Y_MIN,
@@ -143,8 +145,12 @@ class Endstops {
143145
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
144146
static void not_homing();
145147

146-
// If the last move failed to trigger an endstop, call kill
147-
static void validate_homing_move();
148+
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
149+
// If the last move failed to trigger an endstop, call kill
150+
static void validate_homing_move();
151+
#else
152+
FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); }
153+
#endif
148154

149155
// Clear endstops (i.e., they were hit intentionally) to suppress the report
150156
FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }

Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@
340340
// Configuration for second X-carriage
341341
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
342342
// the second x-carriage always homes to the maximum endstop.
343+
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
344+
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
343345
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
344346
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
345347
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position

Marlin/example_configurations/Anet/A6/Configuration_adv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@
340340
// Configuration for second X-carriage
341341
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
342342
// the second x-carriage always homes to the maximum endstop.
343+
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
344+
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
343345
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
344346
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
345347
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position

Marlin/example_configurations/Anet/A8/Configuration_adv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@
340340
// Configuration for second X-carriage
341341
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
342342
// the second x-carriage always homes to the maximum endstop.
343+
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
344+
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
343345
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
344346
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
345347
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position

Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@
340340
// Configuration for second X-carriage
341341
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
342342
// the second x-carriage always homes to the maximum endstop.
343+
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
344+
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
343345
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
344346
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
345347
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position

0 commit comments

Comments
 (0)