Skip to content

Commit

Permalink
Merge remote-tracking branch 'official/1.1.x' into 1.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MingchenZhang committed Aug 13, 2018
2 parents 023591b + 452c057 commit a8f0e2a
Show file tree
Hide file tree
Showing 66 changed files with 238 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x

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

### C++ Coding Standards
Expand Down
22 changes: 17 additions & 5 deletions Marlin/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)

/**
* Dual X Carriage
*/
#if ENABLED(DUAL_X_CARRIAGE)
#ifndef X1_MIN_POS
#define X1_MIN_POS X_MIN_POS
#endif
#ifndef X1_MAX_POS
#define X1_MAX_POS X_BED_SIZE
#endif
#endif

/**
* CoreXY, CoreXZ, and CoreYZ - and their reverse
*/
Expand Down Expand Up @@ -416,7 +428,7 @@
#define MINIMUM_STEPPER_DIR_DELAY 500
#elif HAS_DRIVER(A4988)
#define MINIMUM_STEPPER_DIR_DELAY 200
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#define MINIMUM_STEPPER_DIR_DELAY 20
#else
#define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
Expand All @@ -432,7 +444,7 @@
#define MINIMUM_STEPPER_PULSE 2
#elif HAS_DRIVER(A4988) || HAS_DRIVER(LV8729)
#define MINIMUM_STEPPER_PULSE 1
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#define MINIMUM_STEPPER_PULSE 0
#else
#define MINIMUM_STEPPER_PULSE 2
Expand All @@ -448,7 +460,7 @@
#define MAXIMUM_STEPPER_RATE 150000
#elif HAS_DRIVER(DRV8825)
#define MAXIMUM_STEPPER_RATE 250000
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#elif HAS_TRINAMIC || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE)
#define MAXIMUM_STEPPER_RATE 400000
#elif HAS_DRIVER(A4988)
#define MAXIMUM_STEPPER_RATE 500000
Expand Down Expand Up @@ -719,9 +731,9 @@

// Trinamic Stepper Drivers
#define HAS_STEALTHCHOP (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208))
#define HAS_STALLGUARD (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2660))
#define HAS_STALLGUARD HAS_DRIVER(TMC2130)
#define AXIS_HAS_STEALTHCHOP(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2208) )
#define AXIS_HAS_STALLGUARD(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2660) )
#define AXIS_HAS_STALLGUARD(ST) AXIS_DRIVER_TYPE(ST, TMC2130)

#if ENABLED(SENSORLESS_HOMING)
// Disable Z axis sensorless homing if a probe is used to home the Z axis
Expand Down
2 changes: 2 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
Expand Down
2 changes: 1 addition & 1 deletion Marlin/MarlinConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

#include "boards.h"
#include "macros.h"
#include "drivers.h"
#include "Version.h"
#include "Configuration.h"
#include "Conditionals_LCD.h"
#include "drivers.h"
#include "Configuration_adv.h"

#if USE_MARLINSERIAL
Expand Down
30 changes: 22 additions & 8 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ bool get_target_extruder_from_command(const uint16_t code) {
if (axis == X_AXIS) {

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

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

#if HAS_BED_PROBE
#if HAS_BED_PROBE && ENABLED(ULTIPANEL)
static float probe_z_shift(const float center) {
STOW_PROBE();
endstops.enable_z_probe(false);
Expand Down Expand Up @@ -6059,7 +6059,7 @@ void home_all_axes() { gcode_G28(true); }

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

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

// Save current position to destination, for use later
set_destination_from_current();

#if HAS_LEVELING
// Set current position to the physical position
const bool leveling_was_active = planner.leveling_active;
Expand All @@ -12063,10 +12060,23 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n

#if ENABLED(DUAL_X_CARRIAGE)

#if HAS_SOFTWARE_ENDSTOPS
// Update the X software endstops early
active_extruder = tmp_extruder;
update_software_endstops(X_AXIS);
active_extruder = !tmp_extruder;
#endif

// Don't move the new extruder out of bounds
if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
no_move = true;

if (!no_move) set_destination_from_current();
dualx_tool_change(tmp_extruder, no_move); // Can modify no_move

#else // !DUAL_X_CARRIAGE

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

feedrate_mm_s = old_feedrate_mm_s;

#if HAS_SOFTWARE_ENDSTOPS && ENABLED(DUAL_X_CARRIAGE)
update_software_endstops(X_AXIS);
#endif

#else // HOTENDS <= 1

UNUSED(fr_mm_s);
Expand Down
14 changes: 7 additions & 7 deletions Marlin/Max7219_Debug_LEDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* support functions available to control the LEDs in the 8x8 grid.
*
* If you are using the Max7219 matrix for firmware debug purposes in time sensitive
* areas of the code, please be aware that the orientation (rotation) of the display can
* areas of the code, please be aware that the orientation (rotation) of the display can
* affect the speed. The Max7219 can update a single column fairly fast. It is much
* faster to do a Max7219_Set_Column() with a rotation of 90 or 270 degrees than to do
* a Max7219_Set_Row(). The opposite is true for rotations of 0 or 180 degrees.
Expand Down Expand Up @@ -107,8 +107,8 @@ void Max7219_idle_tasks();
#define MAX7219_X_LEDS (8 * MAX7219_NUMBER_UNITS)
#define MAX7219_Y_LEDS 8
#define XOR_7219(x, y) LEDs[y + (x >> 3) * 8] ^= _BV(7 - (x & 0x07))
#define SET_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] |= _BV(7 - (x & 0x07))
#define CLEAR_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] &= (_BV(7 - (x & 0x07)) ^ 0xff)
#define SET_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] |= _BV(7 - (x & 0x07))
#define CLEAR_PIXEL_7219(x, y) LEDs[y + (x >> 3) * 8] &= (_BV(7 - (x & 0x07)) ^ 0xFF)
#define BIT_7219(x, y) TEST(LEDs[y + (x >> 3) * 8], 7 - (x & 0x07))
#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)
#elif _ROT == 90
Expand All @@ -117,16 +117,16 @@ void Max7219_idle_tasks();
#define MAX7219_Y_LEDS (8 * MAX7219_NUMBER_UNITS)
#define XOR_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] ^= _BV((y & 0x7))
#define SET_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] |= _BV((y & 0x7))
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] &= (_BV((y & 0x7)) ^ 0xff)
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)] &= (_BV((y & 0x7)) ^ 0xFF)
#define BIT_7219(x, y) TEST(LEDs[x + (((MAX7219_Y_LEDS - 1 - y) >> 3) * 8)], (y & 0x7))
#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)
#elif _ROT == 180
#define MAX7219_UPDATE_AXIS y // Fast line update axis for this orientation of the matrix display
#define MAX7219_X_LEDS (8 * MAX7219_NUMBER_UNITS)
#define MAX7219_Y_LEDS 8
#define XOR_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] ^= _BV((x & 0x07))
#define SET_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] |= _BV((x & 0x07))
#define CLEAR_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] &= (_BV((x & 0x07)) ^ 0xff)
#define SET_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] |= _BV((x & 0x07))
#define CLEAR_PIXEL_7219(x, y) LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8] &= (_BV((x & 0x07)) ^ 0xFF)
#define BIT_7219(x, y) TEST(LEDs[y + ((MAX7219_X_LEDS - 1 - x) >> 3) * 8], ((x & 0x07)))
#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)
#elif _ROT == 270
Expand All @@ -135,7 +135,7 @@ void Max7219_idle_tasks();
#define MAX7219_Y_LEDS (8 * MAX7219_NUMBER_UNITS)
#define XOR_7219(x, y) LEDs[x + (y >> 3) * 8] ^= _BV(7 - (y & 0x7))
#define SET_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] |= _BV(7 - (y & 0x7))
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] &= (_BV(7 - (y & 0x7)) ^ 0xff)
#define CLEAR_PIXEL_7219(x, y) LEDs[x + (y >> 3) * 8] &= (_BV(7 - (y & 0x7)) ^ 0xFF)
#define BIT_7219(x, y) TEST(LEDs[x + ( y >> 3) * 8], 7 - (y & 0x7))
#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)
#else
Expand Down
2 changes: 1 addition & 1 deletion Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
#if ENABLED(STEALTHCHOP) && !HAS_STEALTHCHOP
#error "STEALTHCHOP requires TMC2130 or TMC2208 stepper drivers."
#endif
#endif

/**
* Digipot requirement
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* Marlin release version identifier
*/
#define SHORT_BUILD_VERSION "1.1.9"
#define SHORT_BUILD_VERSION "bugfix-1.1.x"

/**
* Verbose version identifier which should contain a reference to the location
Expand Down
4 changes: 2 additions & 2 deletions Marlin/configuration_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,8 +2219,8 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR("EEPROM can hold ", calc_num_meshes());
SERIAL_ECHOLNPGM(" meshes.\n");
}
// ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)

//ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)
// solution needs to be found.
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)

Expand Down
51 changes: 9 additions & 42 deletions Marlin/drivers.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,47 +45,14 @@
#define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T)
#define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T)
#define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T)

#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)
#define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T)
#else
#define AXIS_DRIVER_TYPE_X2(T) false
#endif
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T)
#else
#define AXIS_DRIVER_TYPE_Y2(T) false
#endif
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
#define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T)
#else
#define AXIS_DRIVER_TYPE_Z2(T) false
#endif
#if E_STEPPERS > 0
#define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T)
#else
#define AXIS_DRIVER_TYPE_E0(T) false
#endif
#if E_STEPPERS > 1
#define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T)
#else
#define AXIS_DRIVER_TYPE_E1(T) false
#endif
#if E_STEPPERS > 2
#define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T)
#else
#define AXIS_DRIVER_TYPE_E2(T) false
#endif
#if E_STEPPERS > 3
#define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T)
#else
#define AXIS_DRIVER_TYPE_E3(T) false
#endif
#if E_STEPPERS > 4
#define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T)
#else
#define AXIS_DRIVER_TYPE_E4(T) false
#endif
#define AXIS_DRIVER_TYPE_X2(T) (ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && AXIS_DRIVER_TYPE(X2,T)
#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Y2,T))
#define AXIS_DRIVER_TYPE_Z2(T) (ENABLED(Z_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Z2,T))
#define AXIS_DRIVER_TYPE_E0(T) (E_STEPPERS > 0 && AXIS_DRIVER_TYPE(E0,T))
#define AXIS_DRIVER_TYPE_E1(T) (E_STEPPERS > 1 && AXIS_DRIVER_TYPE(E1,T))
#define AXIS_DRIVER_TYPE_E2(T) (E_STEPPERS > 2 && AXIS_DRIVER_TYPE(E2,T))
#define AXIS_DRIVER_TYPE_E3(T) (E_STEPPERS > 3 && AXIS_DRIVER_TYPE(E3,T))
#define AXIS_DRIVER_TYPE_E4(T) (E_STEPPERS > 4 && AXIS_DRIVER_TYPE(E4,T))

#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \
AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \
Expand All @@ -96,7 +63,7 @@

// Test for supported TMC drivers that require advanced configuration
// Does not match standalone configurations
#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) )
#define HAS_TRINAMIC (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208))

#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \
AXIS_DRIVER_TYPE_##A(TMC2208) || \
Expand Down
12 changes: 7 additions & 5 deletions Marlin/endstops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ void Endstops::not_homing() {
#endif
}

// If the last move failed to trigger an endstop, call kill
void Endstops::validate_homing_move() {
if (trigger_state()) hit_on_purpose();
else kill(PSTR(MSG_ERR_HOMING_FAILED));
}
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
void Endstops::validate_homing_move() {
if (trigger_state()) hit_on_purpose();
else kill(PSTR(MSG_ERR_HOMING_FAILED));
}
#endif

// Enable / disable endstop z-probe checking
#if HAS_BED_PROBE
Expand Down
10 changes: 8 additions & 2 deletions Marlin/endstops.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#include "MarlinConfig.h"

#define VALIDATE_HOMING_ENDSTOPS

enum EndstopEnum : char {
X_MIN,
Y_MIN,
Expand Down Expand Up @@ -143,8 +145,12 @@ class Endstops {
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
static void not_homing();

// If the last move failed to trigger an endstop, call kill
static void validate_homing_move();
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
static void validate_homing_move();
#else
FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); }
#endif

// Clear endstops (i.e., they were hit intentionally) to suppress the report
FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Anet/A6/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
Expand Down
2 changes: 2 additions & 0 deletions Marlin/example_configurations/Anet/A8/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
Expand Down
Loading

0 comments on commit a8f0e2a

Please sign in to comment.