Browse Source

Software endstop options as simple switches

pull/1/head
Scott Lahteine 8 years ago
parent
commit
0e410c9dfd
  1. 2
      Marlin/Conditionals_LCD.h
  2. 13
      Marlin/Configuration.h
  3. 8
      Marlin/Marlin_main.cpp
  4. 2
      Marlin/SanityCheck.h
  5. 13
      Marlin/example_configurations/Cartesio/Configuration.h
  6. 11
      Marlin/example_configurations/Felix/Configuration.h
  7. 13
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  8. 13
      Marlin/example_configurations/Hephestos/Configuration.h
  9. 13
      Marlin/example_configurations/Hephestos_2/Configuration.h
  10. 13
      Marlin/example_configurations/K8200/Configuration.h
  11. 13
      Marlin/example_configurations/K8400/Configuration.h
  12. 13
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  13. 13
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  14. 13
      Marlin/example_configurations/RigidBot/Configuration.h
  15. 13
      Marlin/example_configurations/SCARA/Configuration.h
  16. 13
      Marlin/example_configurations/TAZ4/Configuration.h
  17. 13
      Marlin/example_configurations/WITBOX/Configuration.h
  18. 13
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  19. 13
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  20. 13
      Marlin/example_configurations/delta/generic/Configuration.h
  21. 13
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  22. 13
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  23. 13
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  24. 13
      Marlin/example_configurations/makibox/Configuration.h
  25. 13
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  26. 4
      Marlin/ultralcd.cpp

2
Marlin/Conditionals_LCD.h

@ -369,6 +369,6 @@
#undef Z_MIN_PROBE_ENDSTOP #undef Z_MIN_PROBE_ENDSTOP
#endif #endif
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(min_software_endstops) || ENABLED(max_software_endstops)) #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
#endif //CONDITIONALS_LCD_H #endif //CONDITIONALS_LCD_H

13
Marlin/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 200 #define Z_MAX_POS 200
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

8
Marlin/Marlin_main.cpp

@ -7889,7 +7889,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
&& (delayed_move_time || current_position[X_AXIS] != xhome) && (delayed_move_time || current_position[X_AXIS] != xhome)
) { ) {
float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT; float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT;
#if ENABLED(max_software_endstops) #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
NOMORE(raised_z, soft_endstop_max[Z_AXIS]); NOMORE(raised_z, soft_endstop_max[Z_AXIS]);
#endif #endif
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
@ -7940,7 +7940,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
// record raised toolhead position for use by unpark // record raised toolhead position for use by unpark
COPY(raised_parked_position, current_position); COPY(raised_parked_position, current_position);
raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT; raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
#if ENABLED(max_software_endstops) #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]); NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
#endif #endif
active_extruder_parked = true; active_extruder_parked = true;
@ -8983,12 +8983,12 @@ void ok_to_send() {
*/ */
void clamp_to_software_endstops(float target[XYZ]) { void clamp_to_software_endstops(float target[XYZ]) {
if (!soft_endstops_enabled) return; if (!soft_endstops_enabled) return;
#if ENABLED(min_software_endstops) #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]); NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]); NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]); NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
#endif #endif
#if ENABLED(max_software_endstops) #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]); NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]); NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]); NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);

2
Marlin/SanityCheck.h

@ -158,6 +158,8 @@
#error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions." #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
#elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN) #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
#error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h." #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
#elif defined(min_software_endstops) || defined(max_software_endstops)
#error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
#endif #endif
/** /**

13
Marlin/example_configurations/Cartesio/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 270 #define Y_MAX_POS 270
#define Z_MAX_POS 400 #define Z_MAX_POS 400
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

11
Marlin/example_configurations/Felix/Configuration.h

@ -688,16 +688,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN
// :[-1, 1] // :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -708,6 +704,11 @@
#define Y_MAX_POS 205 #define Y_MAX_POS 205
#define Z_MAX_POS 235 #define Z_MAX_POS 235
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/Felix/DUAL/Configuration.h

@ -688,16 +688,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -708,6 +704,11 @@
#define Y_MAX_POS 205 #define Y_MAX_POS 205
#define Z_MAX_POS 235 #define Z_MAX_POS 235
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/Hephestos/Configuration.h

@ -697,16 +697,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -717,6 +713,11 @@
#define Y_MAX_POS 210 #define Y_MAX_POS 210
#define Z_MAX_POS 180 #define Z_MAX_POS 180
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/Hephestos_2/Configuration.h

@ -699,16 +699,12 @@
#define Z_HOMING_HEIGHT 5 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... #define Z_HOMING_HEIGHT 5 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -719,6 +715,11 @@
#define Y_MAX_POS 297 #define Y_MAX_POS 297
#define Z_MAX_POS 210 #define Z_MAX_POS 210
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/K8200/Configuration.h

@ -734,16 +734,12 @@
#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... #define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -754,6 +750,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 200 #define Z_MAX_POS 200
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/K8400/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 190 #define Z_MAX_POS 190
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/K8400/Dual-head/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 190 #define Z_MAX_POS 190
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 200 #define Z_MAX_POS 200
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/RigidBot/Configuration.h

@ -704,16 +704,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -724,6 +720,11 @@
#define Y_MAX_POS 248 // RigidBot regular is 248mm, RigitBot Big is 304mm #define Y_MAX_POS 248 // RigidBot regular is 248mm, RigitBot Big is 304mm
#define Z_MAX_POS 254 // RigidBot regular and Big are 254mm #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.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/SCARA/Configuration.h

@ -720,16 +720,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 #define X_HOME_DIR 1
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -740,6 +736,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 225 #define Z_MAX_POS 225
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/TAZ4/Configuration.h

@ -726,16 +726,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -746,6 +742,11 @@
#define Y_MAX_POS 275 #define Y_MAX_POS 275
#define Z_MAX_POS 250 #define Z_MAX_POS 250
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/WITBOX/Configuration.h

@ -697,16 +697,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 #define X_HOME_DIR 1
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -717,6 +713,11 @@
#define Y_MAX_POS 210 #define Y_MAX_POS 210
#define Z_MAX_POS 200 #define Z_MAX_POS 200
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/adafruit/ST7565/Configuration.h

@ -705,16 +705,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -725,6 +721,11 @@
#define Y_MAX_POS 200 #define Y_MAX_POS 200
#define Z_MAX_POS 200 #define Z_MAX_POS 200
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h

@ -807,16 +807,12 @@
#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... #define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 // deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -827,6 +823,11 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS #define Z_MAX_POS MANUAL_Z_HOME_POS
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/delta/generic/Configuration.h

@ -791,16 +791,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 // deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -811,6 +807,11 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS #define Z_MAX_POS MANUAL_Z_HOME_POS
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -794,16 +794,12 @@
//#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 // deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -814,6 +810,11 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS #define Z_MAX_POS MANUAL_Z_HOME_POS
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/delta/kossel_pro/Configuration.h

@ -793,16 +793,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 // deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -813,6 +809,11 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS #define Z_MAX_POS MANUAL_Z_HOME_POS
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/delta/kossel_xl/Configuration.h

@ -797,16 +797,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR 1 // deltas always home to max #define X_HOME_DIR 1 // deltas always home to max
#define Y_HOME_DIR 1 #define Y_HOME_DIR 1
#define Z_HOME_DIR 1 #define Z_HOME_DIR 1
#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -817,6 +813,11 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS #define Z_MAX_POS MANUAL_Z_HOME_POS
// If enabled, axes won't move below MIN_POS in response to movement commands.
//#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/makibox/Configuration.h

@ -708,16 +708,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -728,6 +724,11 @@
#define Y_MAX_POS 150 #define Y_MAX_POS 150
#define Z_MAX_POS 86 #define Z_MAX_POS 86
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

13
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -701,16 +701,12 @@
//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... //#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case. // Be sure you have this distance over your Z_MAX_POS in case.
// ENDSTOP SETTINGS: // Direction of endstops when homing; 1=MAX, -1=MIN
// Sets direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]
// :[-1, 1]
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -721,6 +717,11 @@
#define Y_MAX_POS 205 #define Y_MAX_POS 205
#define Z_MAX_POS 120 #define Z_MAX_POS 120
// If enabled, axes won't move below MIN_POS in response to movement commands.
#define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
#define MAX_SOFTWARE_ENDSTOPS
/** /**
* Filament Runout Sensor * Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament. * A mechanical or opto endstop is used to check for the presence of filament.

4
Marlin/ultralcd.cpp

@ -1602,10 +1602,10 @@ KeepDrawing:
#if HAS_SOFTWARE_ENDSTOPS #if HAS_SOFTWARE_ENDSTOPS
// Limit to software endstops, if enabled // Limit to software endstops, if enabled
if (soft_endstops_enabled) { if (soft_endstops_enabled) {
#if ENABLED(min_software_endstops) #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
min = soft_endstop_min[axis]; min = soft_endstop_min[axis];
#endif #endif
#if ENABLED(max_software_endstops) #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
max = soft_endstop_max[axis]; max = soft_endstop_max[axis];
#endif #endif
} }

Loading…
Cancel
Save