diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 608fbc1393..74867fb4d8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_AVR.h index 95c0db5c6e..60a73581c0 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/HAL_AVR.h @@ -26,8 +26,8 @@ */ -#ifndef _HAL_AVR_H -#define _HAL_AVR_H +#ifndef _HAL_AVR_H_ +#define _HAL_AVR_H_ // -------------------------------------------------------------------------- // Includes @@ -153,9 +153,4 @@ inline void HAL_adc_init(void) { #define HAL_READ_ADC ADC - -// -------------------------------------------------------------------------- -// -// -------------------------------------------------------------------------- - -#endif // _HAL_AVR_H +#endif // _HAL_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h index 0e430beea3..a278c08b99 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h @@ -20,7 +20,10 @@ * */ -#ifndef HAL_PINSDEBUG_AVR_H +#ifndef _HAL_PINSDEBUG_AVR_H_ +#define _HAL_PINSDEBUG_AVR_H_ + +#include "../../inc/MarlinConfig.h" void HAL_print_analog_pin(char buffer[], int8_t pin) { sprintf(buffer, "(A%2d) ", int(pin - analogInputToDigitalPin(0))); @@ -110,11 +113,6 @@ const PinInfo pin_array[] PROGMEM = { }; -#define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \ -|| MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \ -|| MOTHERBOARD == BOARD_MINIRAMBO \ -|| MOTHERBOARD == BOARD_SCOOVO_X9H) - #if AVR_AT90USB1286_FAMILY // Working with Teensyduino extension so need to re-define some things #include "pinsDebug_Teensyduino.h" @@ -590,4 +588,4 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f } } -#endif //HAL_PINSDEBUG_AVR_H \ No newline at end of file +#endif // _HAL_PINSDEBUG_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h index a909ad98d6..e289e7cf1f 100644 --- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h +++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h @@ -29,8 +29,8 @@ * Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF) */ -#ifndef MARLINSERIAL_H -#define MARLINSERIAL_H +#ifndef _MARLINSERIAL_H_ +#define _MARLINSERIAL_H_ #include "../../inc/MarlinConfig.h" @@ -181,4 +181,4 @@ extern HardwareSerial bluetoothSerial; #endif -#endif // MARLINSERIAL_H +#endif // _MARLINSERIAL_H_ diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h index a8bad153e2..f2b8233efa 100644 --- a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h +++ b/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h @@ -20,15 +20,13 @@ * */ +#ifndef _SANITYCHECK_AVR_8_BIT_H_ +#define _SANITYCHECK_AVR_8_BIT_H_ + /** * Test AVR specific configuration values for errors at compile-time. */ -/** - * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features. - */ - - /** * Digipot requirement */ @@ -39,12 +37,9 @@ #endif #endif - - /** * Sanity checks for Spindle / Laser */ - #if ENABLED(SPINDLE_LASER_ENABLE) #if !PIN_EXISTS(SPINDLE_LASER_ENABLE) #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN." @@ -100,3 +95,5 @@ #endif #endif #endif // SPINDLE_LASER_ENABLE + +#endif // _SANITYCHECK_AVR_8_BIT_H_ diff --git a/Marlin/src/HAL/HAL_AVR/ServoTimers.h b/Marlin/src/HAL/HAL_AVR/ServoTimers.h index 231d1a6d26..7d7c27515b 100644 --- a/Marlin/src/HAL/HAL_AVR/ServoTimers.h +++ b/Marlin/src/HAL/HAL_AVR/ServoTimers.h @@ -21,7 +21,7 @@ */ /* - Servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 + ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 Copyright (c) 2009 Michael Margolis. All right reserved. This library is free software; you can redistribute it and/or @@ -39,7 +39,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* +#ifndef _SERVOTIMERS_H_ +#define _SERVOTIMERS_H_ + +/** * Defines for 16 bit timers used with Servo library * * If _useTimerX is defined then TimerX is a 16 bit timer on the current board @@ -88,3 +91,5 @@ typedef enum { #endif _Nbr_16timers } timer16_Sequence_t; + +#endif // _SERVOTIMERS_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1280.h b/Marlin/src/HAL/HAL_AVR/fastio_1280.h index ed96002f27..aae91a104b 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1280.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1280.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 */ -#ifndef _FASTIO_1280 -#define _FASTIO_1280 +#ifndef _FASTIO_1280_H_ +#define _FASTIO_1280_H_ #include "fastio_AVR.h" @@ -1112,4 +1112,4 @@ #define PL7_DDR DDRL #define PL7_PWM NULL -#endif // _FASTIO_1280 +#endif // _FASTIO_1280_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1281.h b/Marlin/src/HAL/HAL_AVR/fastio_1281.h index 0bbea73ed6..59cfce889e 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1281.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1281.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 */ -#ifndef _FASTIO_1281 -#define _FASTIO_1281 +#ifndef _FASTIO_1281_H_ +#define _FASTIO_1281_H_ #include "fastio_AVR.h" @@ -717,4 +717,4 @@ #define PG5_DDR DDRG #define PG5_PWM &OCR0B -#endif // _FASTIO_1281 +#endif // _FASTIO_1281_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_168.h b/Marlin/src/HAL/HAL_AVR/fastio_168.h index 89304defe2..cc78ee26c0 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_168.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_168.h @@ -28,8 +28,8 @@ * Marlin 08 09 10 11 12 13 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 */ -#ifndef _FASTIO_168 -#define _FASTIO_168 +#ifndef _FASTIO_168_H_ +#define _FASTIO_168_H_ #include "fastio_AVR.h" @@ -359,4 +359,4 @@ #define PD7_DDR DDRD #define PD7_PWM NULL -#endif // _FASTIO_168 +#endif // _FASTIO_168_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_644.h b/Marlin/src/HAL/HAL_AVR/fastio_644.h index c0a453397d..031aa133b6 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_644.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_644.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 */ -#ifndef _FASTIO_644 -#define _FASTIO_644 +#ifndef _FASTIO_644_H_ +#define _FASTIO_644_H_ #include "fastio_AVR.h" @@ -528,4 +528,4 @@ #define PD7_DDR DDRD #define PD7_PWM OCR2A -#endif // _FASTIO_644 +#endif // _FASTIO_644_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h index 803944e4df..b9747decbd 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h @@ -29,8 +29,8 @@ * The pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3 */ -#ifndef _FASTIO_AT90USB -#define _FASTIO_AT90USB +#ifndef _FASTIO_AT90USB_H_ +#define _FASTIO_AT90USB_H_ #include "fastio_AVR.h" @@ -699,4 +699,4 @@ #define TIMER3B 4 #define TIMER3C 3 -#endif // _FASTIO_AT90USB +#endif // _FASTIO_AT90USB_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h index 5e3292d822..eb4e883b63 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h @@ -26,8 +26,8 @@ * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team. */ -#ifndef _FASTIO_ARDUINO_H -#define _FASTIO_ARDUINO_H +#ifndef _FASTIO_ARDUINO_H_ +#define _FASTIO_ARDUINO_H_ #include #include "../../core/macros.h" @@ -323,4 +323,4 @@ typedef enum { // finally - the macro that tells us if a pin is an available hardware PWM #define USEABLE_HARDWARE_PWM(p) (PWM_PINS(p) && !PWM_CHK(p)) -#endif // _FASTIO_ARDUINO_H +#endif // _FASTIO_ARDUINO_H_ diff --git a/Marlin/src/HAL/HAL_AVR/math_AVR.h b/Marlin/src/HAL/HAL_AVR/math_AVR.h index 9d210eed38..e0feab034f 100644 --- a/Marlin/src/HAL/HAL_AVR/math_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/math_AVR.h @@ -20,8 +20,8 @@ * */ -#ifndef MATH_AVR_H -#define MATH_AVR_H +#ifndef _MATH_AVR_H_ +#define _MATH_AVR_H_ /** * Optimized math functions for AVR @@ -109,4 +109,4 @@ ) -#endif +#endif // _MATH_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h index bf8da829cc..595283f9c7 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h @@ -24,11 +24,10 @@ * PWM print routines for Atmel 8 bit AVR CPUs */ +#ifndef _PINSDEBUG_AVR_8_BIT_ +#define _PINSDEBUG_AVR_8_BIT_ -#define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \ -|| MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \ -|| MOTHERBOARD == BOARD_MINIRAMBO \ -|| MOTHERBOARD == BOARD_SCOOVO_X9H) +#include "../../inc/MarlinConfig.h" #if AVR_AT90USB1286_FAMILY // Working with Teensyduino extension so need to re-define some things @@ -399,3 +398,5 @@ static void pwm_details(uint8_t pin) { #endif #define GET_PIN_INFO(pin) do{}while(0) + +#endif // _PINSDEBUG_AVR_8_BIT_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h index 187c190f68..840e2a22e9 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h @@ -20,6 +20,9 @@ * */ +#ifndef _PINSDEBUG_TEENSYSUINO_H_ +#define _PINSDEBUG_TEENSYSUINO_H_ + // // some of the pin mapping functions of the Teensduino extension to the Arduino IDE // do not function the same as the other Arduino extensions @@ -108,3 +111,5 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = { // disable the PWMs so we can use it as is // portModeRegister(pin) is OK + +#endif // _PINSDEBUG_TEENSYSUINO_H_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h index 1a905bd463..95006ee7ef 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h @@ -25,8 +25,8 @@ * structurs for 2560 family boards that use morre than 70 pins */ -#ifndef __PINSDEBUG_PLUS_70_H__ -#define __PINSDEBUG_PLUS_70_H__ +#ifndef _PINSDEBUG_PLUS_70_H_ +#define _PINSDEBUG_PLUS_70_H_ #undef NUM_DIGITAL_PINS #if MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D @@ -338,4 +338,4 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = { */ -#endif // __PINSDEBUG_PLUS_70_H__ +#endif // _PINSDEBUG_PLUS_70_H_ diff --git a/Marlin/src/HAL/HAL_AVR/spi_pins.h b/Marlin/src/HAL/HAL_AVR/spi_pins.h index 9d67bad362..d4838956e7 100644 --- a/Marlin/src/HAL/HAL_AVR/spi_pins.h +++ b/Marlin/src/HAL/HAL_AVR/spi_pins.h @@ -20,8 +20,8 @@ * */ -#ifndef SPI_PINS_H_ -#define SPI_PINS_H_ +#ifndef _SPI_PINS_H_ +#define _SPI_PINS_H_ /** * Define SPI Pins: SCK, MISO, MOSI, SS @@ -67,4 +67,4 @@ #endif -#endif /* SPI_PINS_H_ */ +#endif // _SPI_PINS_H_ diff --git a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h index a66feebeca..90c6185cb6 100644 --- a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h @@ -20,8 +20,8 @@ * */ -#ifndef WATCHDOG_AVR_H -#define WATCHDOG_AVR_H +#ifndef _WATCHDOG_AVR_H_ +#define _WATCHDOG_AVR_H_ #include @@ -32,4 +32,4 @@ void watchdog_init(); // first watchdog_init or AVR will go into emergency procedures. inline void watchdog_reset() { wdt_reset(); } -#endif // WATCHDOG_AVR_H +#endif // _WATCHDOG_AVR_H_ diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 608fbc1393..74867fb4d8 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 114494acd3..54bd517c02 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -805,10 +805,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 250 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 62464e0bc3..6ba7d11894 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 260 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 314b153e43..2d90a68741 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -904,10 +904,30 @@ #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index ee4a8bf539..b65f36fe7a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -791,10 +791,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 240 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index d9ad572728..db352fbc30 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -776,10 +776,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 94f1944e08..5a29295c77 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -786,10 +786,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 210 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 82104c4872..4e49511b27 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -776,10 +776,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 53d8a8d9a2..8338025081 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -784,10 +784,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 400 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index b55e5adb59..0f9d37fecc 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -795,10 +795,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 400 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e33b748eeb..25d2bdb192 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -767,10 +767,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 235 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 54d055c339..d08f464a80 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -767,10 +767,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 235 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index d158a800c0..902ee2f452 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -789,10 +789,30 @@ #define Y_MAX_POS 182 #define Z_MAX_POS 175 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index edabf41aba..e643b2cb5d 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -800,10 +800,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 33051a4a2e..05bc41fce0 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 170 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index bc190462d1..7f44145fcd 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -789,10 +789,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 185 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 1184ab32b6..24f73261ff 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -809,10 +809,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 1dbf0f6181..dba9b5ecea 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -787,10 +787,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds //#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index f8d47c211e..76ffa3efe5 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index b31434b15d..06fd215949 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -783,10 +783,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 254 // RigidBot regular and Big are 254mm -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 25d73d4a86..8ab3152959 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -797,10 +797,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 225 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index fa82a1f694..c85dc0fb64 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -816,10 +816,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 170 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index c9035cdb5f..29a5bb6f97 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -841,10 +841,30 @@ #define Z_MAX_POS 158 #endif -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index af5d864e6f..78415e819e 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -815,10 +815,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index fd5435fc9f..01f85c368e 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 190 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 2e98e6eb8b..a3f739cd90 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 190 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index c72bb1b5ba..7322a746cc 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index c60caf7b74..736740ab87 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -909,10 +909,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index b8ea78524f..0b1bd642f2 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -909,10 +909,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index ef7ab6d58e..ab41a1a51d 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -896,10 +896,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 4c0eb3cea9..def7ae060d 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -899,10 +899,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 766fe8616d..d9decdf9cb 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -899,10 +899,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 627dd05e7c..264e932708 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -908,10 +908,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index e3314f761c..5b98c7d7c4 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -799,10 +799,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 500 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index a5a88f3c12..067abc97e3 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -788,10 +788,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 86 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index b82179a4d5..5ce28095a8 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -772,10 +772,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index d676e7cd08..a3d0066a21 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -780,10 +780,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 120 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index b3f98ac2fb..ae8f174a93 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -790,10 +790,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 143.0 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6619a3bb8d..ae4ddb7a65 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -28,6 +28,13 @@ #ifndef CONDITIONALS_POST_H #define CONDITIONALS_POST_H + #define AVR_ATmega2560_FAMILY_PLUS_70 ( \ + MB(BQ_ZUM_MEGA_3D) \ + || MB(MIGHTYBOARD_REVE) \ + || MB(MINIRAMBO) \ + || MB(SCOOVO_X9H) \ + ) + #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) #define IS_CARTESIAN !IS_KINEMATIC @@ -793,7 +800,17 @@ #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF)) /** - * Delta radius/rod trimmers/angle trimmers + * Only constrain Z on DELTA / SCARA machines + */ + #if IS_KINEMATIC + #undef MIN_SOFTWARE_ENDSTOP_X + #undef MIN_SOFTWARE_ENDSTOP_Y + #undef MAX_SOFTWARE_ENDSTOP_X + #undef MAX_SOFTWARE_ENDSTOP_Y + #endif + + /** + * Delta endstops, radius/rod trimmers, angle trimmers */ #if ENABLED(DELTA) #ifndef DELTA_CALIBRATION_RADIUS diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index b05e3e6031..d539557066 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -254,6 +254,25 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE."); +/** + * Granular software endstops (Marlin >= 1.1.7) + */ +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z) + #if IS_KINEMATIC + #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z." + #elif DISABLED(MIN_SOFTWARE_ENDSTOP_X) && DISABLED(MIN_SOFTWARE_ENDSTOP_Y) + #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options." + #endif +#endif + +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z) + #if IS_KINEMATIC + #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z." + #elif DISABLED(MAX_SOFTWARE_ENDSTOP_X) && DISABLED(MAX_SOFTWARE_ENDSTOP_Y) + #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options." + #endif +#endif + /** * Progress Bar */ diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 3931a8f48a..dc9921f1d1 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2834,17 +2834,35 @@ void kill_screen(const char* lcd_msg) { float min = current_position[axis] - 1000, max = current_position[axis] + 1000; - #if HAS_SOFTWARE_ENDSTOPS - // Limit to software endstops, if enabled - if (soft_endstops_enabled) { - #if ENABLED(MIN_SOFTWARE_ENDSTOPS) - min = soft_endstop_min[axis]; - #endif - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - max = soft_endstop_max[axis]; - #endif + // Limit to software endstops, if enabled + #if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + if (soft_endstops_enabled) switch (axis) { + case X_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_X) + min = soft_endstop_min[X_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_X) + max = soft_endstop_max[X_AXIS]; + #endif + break; + case Y_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y) + min = soft_endstop_min[Y_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y) + max = soft_endstop_max[Y_AXIS]; + #endif + break; + case Z_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z) + min = soft_endstop_min[Z_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z) + max = soft_endstop_max[Z_AXIS]; + #endif + break; } - #endif + #endif // MIN_SOFTWARE_ENDSTOPS || MAX_SOFTWARE_ENDSTOPS // Delta limits XY based on the current offset from center // This assumes the center is 0,0 diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index ecc3f8bf97..26620be8f5 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -456,29 +456,28 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, /** * Constrain the given coordinates to the software endstops. + * + * NOTE: This will only apply to Z on DELTA and SCARA. XY is + * constrained to a circle on these kinematic systems. */ - - // NOTE: This makes no sense for delta beds other than Z-axis. - // For delta the X/Y would need to be clamped at - // DELTA_PRINTABLE_RADIUS from center of bed, but delta - // now enforces is_position_reachable for X/Y regardless - // of HAS_SOFTWARE_ENDSTOPS, so that enforcement would be - // redundant here. - void clamp_to_software_endstops(float target[XYZ]) { if (!soft_endstops_enabled) return; - #if ENABLED(MIN_SOFTWARE_ENDSTOPS) - #if DISABLED(DELTA) - NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]); - NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]); - #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_X) + NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]); + #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y) + NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]); + #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z) NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]); #endif - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - #if DISABLED(DELTA) - NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]); - NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]); - #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_X) + NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]); + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y) + NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]); + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z) NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]); #endif } diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 7371fe8357..5b83176f4b 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -45,7 +45,7 @@ */ #if ENABLED(IS_REARM) - #error "Oops! use 'pins_RAMPS_RE_ARM.h' when Re-Arm is used." + #error "Oops! Use 'BOARD_RAMPS_RE_ARM' to build for Re-ARM." #endif #if !ENABLED(IS_RAMPS_SMART) && !ENABLED(IS_RAMPS_DUO) && !ENABLED(IS_RAMPS4DUE) && !ENABLED(TARGET_LPC1768) diff --git a/Marlin/src/pins/pins_TEENSY35_36.h b/Marlin/src/pins/pins_TEENSY35_36.h index b61f1ef85a..57abfa5ae9 100644 --- a/Marlin/src/pins/pins_TEENSY35_36.h +++ b/Marlin/src/pins/pins_TEENSY35_36.h @@ -1,15 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /**************************************************************************************** * Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0) Breadboard pin assignments * Requires the Teensyduino software with Teensy 3.5 or Teensy 3.6 selected in Arduino IDE! * http://www.pjrc.com/teensy/teensyduino.html -* ****************************************************************************************/ -#if MOTHERBOARD == 841 // BOARD_TEENSY35_36 -#define KNOWN_BOARD 1 -#define AT90USB 1286 // Disable MarlinSerial etc. #if !IS_32BIT_TEENSY - #error Oops! Make sure you have 'Teensy 3.5' or 'Teensy 3.6' selected from the 'Tools -> Boards' menu. + #error "Oops! Make sure you have 'Teensy 3.5' or 'Teensy 3.6' selected from the 'Tools -> Boards' menu." #endif #if IS_TEENSY35 @@ -18,12 +36,13 @@ #define BOARD_NAME "Teensy3.6" #endif -#define LARGE_FLASH true +#define AT90USB 1286 // Disable MarlinSerial etc. #define USBCON //1286 // Disable MarlinSerial etc. +#define LARGE_FLASH true /* -teemuatlut plan for Teensy3.5 and Teensy3.6: + teemuatlut plan for Teensy3.5 and Teensy3.6: USB GND |-----#####-----| VIN 5V X_STEP_PIN MOSI1 RX1 0 | ##### | Analog GND @@ -84,7 +103,6 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define HEATER_0_PIN 30 #define HEATER_1_PIN 36 -#define HEATER_2_PIN -1 #define HEATER_BED_PIN 31 #define FAN_PIN 2 @@ -93,27 +111,27 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define Z_STOP_PIN 28 #define TEMP_0_PIN 2 // Extruder / Analog pin numbering: 2 => A2 -#define TEMP_BED_PIN 1 // Bed / Analog pin numbering #define TEMP_1_PIN 0 -#define TEMP_2_PIN -1 +#define TEMP_BED_PIN 1 // Bed / Analog pin numbering -#define SDPOWER -1 -#define SD_DETECT_PIN -1 #define SDSS 39 // 8 #define LED_PIN 13 #define PS_ON_PIN 1 -#define KILL_PIN -1 #define ALARM_PIN -1 #define FILWIDTH_PIN 6 #define SOL1_PIN 28 +#if 0 +// Pretty sure this is obsolete! +// Please use Marlin 1.1.x pins files as reference for new pins files. #ifndef SDSUPPORT // these are defined in the SD library if building with SD support #define SCK_PIN 13 #define MISO_PIN 12 #define MOSI_PIN 11 #endif +#endif #ifdef ULTRA_LCD #define LCD_PINS_RS 40 @@ -126,5 +144,3 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define BTN_EN2 47 #define BTN_ENC 48 #endif - -#endif // MOTHERBOARD == 841 (Teensy3.5 and Teensy3.6)