Upstream commits, allow no extruder in M105

This commit is contained in:
Scott Lahteine 2015-04-03 19:16:38 -07:00
commit 713953d8c1
34 changed files with 835 additions and 680 deletions

View File

@ -10,6 +10,8 @@
#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first #ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
#define PIN_EXISTS(PN) (defined(PN##_PIN) && PN##_PIN >= 0)
#define CONFIGURATION_LCD #define CONFIGURATION_LCD
#if defined(MAKRPANEL) #if defined(MAKRPANEL)
@ -279,7 +281,7 @@
#define PS_ON_AWAKE HIGH #define PS_ON_AWAKE HIGH
#define PS_ON_ASLEEP LOW #define PS_ON_ASLEEP LOW
#endif #endif
#define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0) #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
/** /**
* Temp Sensor defines * Temp Sensor defines
@ -350,25 +352,81 @@
#endif #endif
/** /**
* Shorthand for pin tests, for temperature.cpp * Shorthand for pin tests, used wherever needed
*/ */
#define HAS_TEMP_0 (defined(TEMP_0_PIN) && TEMP_0_PIN >= 0 && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 != -2) #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 != -2)
#define HAS_TEMP_1 (defined(TEMP_1_PIN) && TEMP_1_PIN >= 0 && TEMP_SENSOR_1 != 0) #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0)
#define HAS_TEMP_2 (defined(TEMP_2_PIN) && TEMP_2_PIN >= 0 && TEMP_SENSOR_2 != 0) #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0)
#define HAS_TEMP_3 (defined(TEMP_3_PIN) && TEMP_3_PIN >= 0 && TEMP_SENSOR_3 != 0) #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0)
#define HAS_TEMP_BED (defined(TEMP_BED_PIN) && TEMP_BED_PIN >= 0 && TEMP_SENSOR_BED != 0) #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0)
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0) #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
#define HAS_HEATER_0 (defined(HEATER_0_PIN) && HEATER_0_PIN >= 0) #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
#define HAS_HEATER_1 (defined(HEATER_1_PIN) && HEATER_1_PIN >= 0) #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
#define HAS_HEATER_2 (defined(HEATER_2_PIN) && HEATER_2_PIN >= 0) #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
#define HAS_HEATER_3 (defined(HEATER_3_PIN) && HEATER_3_PIN >= 0) #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
#define HAS_HEATER_BED (defined(HEATER_BED_PIN) && HEATER_BED_PIN >= 0) #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
#define HAS_AUTO_FAN_0 (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
#define HAS_AUTO_FAN_1 (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
#define HAS_AUTO_FAN_2 (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN >= 0) #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
#define HAS_AUTO_FAN_3 (defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN >= 0)
#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
#define HAS_FAN (defined(FAN_PIN) && FAN_PIN >= 0) #define HAS_FAN (PIN_EXISTS(FAN))
#define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
#define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
#define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
#define HAS_HOME (PIN_EXISTS(HOME))
#define HAS_KILL (PIN_EXISTS(KILL))
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
#define HAS_X_MIN (PIN_EXISTS(X_MIN))
#define HAS_X_MAX (PIN_EXISTS(X_MAX))
#define HAS_Y_MIN (PIN_EXISTS(Y_MIN))
#define HAS_Y_MAX (PIN_EXISTS(Y_MAX))
#define HAS_Z_MIN (PIN_EXISTS(Z_MIN))
#define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
#define HAS_Z_PROBE (PIN_EXISTS(Z_PROBE))
#define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
#define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
#define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
#define HAS_MICROSTEPS (PIN_EXISTS(X_MS1))
#define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
#define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
#define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
#define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
#define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
#define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
#define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
#define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
#define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
#define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
#define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
#define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
#define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
#define HAS_X_DIR (PIN_EXISTS(X_DIR))
#define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
#define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
#define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
#define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
#define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
#define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
#define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
#define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
#define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
#define HAS_X_STEP (PIN_EXISTS(X_STEP))
#define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
#define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
#define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
#define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
#define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
#define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
#define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
#define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
#define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
/** /**
* Helper Macros for heaters and extruder fan * Helper Macros for heaters and extruder fan

View File

@ -394,7 +394,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -691,7 +691,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23 // #define PHOTOGRAPH_PIN 23
// SF send wrong arc g-codes when using Arc Point as fillet procedure // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
//#define SF_ARC_FIX //#define SF_ARC_FIX
// Support for the BariCUDA Paste Extruder. // Support for the BariCUDA Paste Extruder.

View File

@ -78,7 +78,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "ConfigurationStore.h" #include "ConfigurationStore.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
@ -308,7 +308,7 @@ void Config_RetrieveSettings() {
uint8_t mesh_num_x = 0; uint8_t mesh_num_x = 0;
uint8_t mesh_num_y = 0; uint8_t mesh_num_y = 0;
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
EEPROM_READ_VAR(i, mbl.active); EEPROM_READ_VAR(i, mbl.active);
EEPROM_READ_VAR(i, mesh_num_x); EEPROM_READ_VAR(i, mesh_num_x);
EEPROM_READ_VAR(i, mesh_num_y); EEPROM_READ_VAR(i, mesh_num_y);

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -110,11 +110,10 @@ void process_commands();
void manage_inactivity(bool ignore_stepper_queue=false); void manage_inactivity(bool ignore_stepper_queue=false);
#if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \ #if defined(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
&& defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
#define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0) #define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
#define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0) #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
#elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 #elif HAS_X_ENABLE
#define enable_x() X_ENABLE_WRITE( X_ENABLE_ON) #define enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
#else #else
@ -122,7 +121,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_x() ; #define disable_x() ;
#endif #endif
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1 #if HAS_Y_ENABLE
#ifdef Y_DUAL_STEPPER_DRIVERS #ifdef Y_DUAL_STEPPER_DRIVERS
#define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); } #define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; } #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
@ -135,7 +134,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_y() ; #define disable_y() ;
#endif #endif
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1 #if HAS_Z_ENABLE
#ifdef Z_DUAL_STEPPER_DRIVERS #ifdef Z_DUAL_STEPPER_DRIVERS
#define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); } #define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; } #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
@ -148,7 +147,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_z() ; #define disable_z() ;
#endif #endif
#if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1) #if HAS_E0_ENABLE
#define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON) #define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
@ -156,7 +155,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_e0() /* nothing */ #define disable_e0() /* nothing */
#endif #endif
#if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1) #if (EXTRUDERS > 1) && HAS_E1_ENABLE
#define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON) #define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
@ -164,7 +163,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_e1() /* nothing */ #define disable_e1() /* nothing */
#endif #endif
#if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1) #if (EXTRUDERS > 2) && HAS_E2_ENABLE
#define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON) #define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
@ -172,7 +171,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_e2() /* nothing */ #define disable_e2() /* nothing */
#endif #endif
#if (EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1) #if (EXTRUDERS > 3) && HAS_E3_ENABLE
#define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON) #define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON) #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
@ -194,7 +193,6 @@ void get_coordinates();
void adjust_delta(float cartesian[3]); void adjust_delta(float cartesian[3]);
#endif #endif
extern float delta[3]; extern float delta[3];
void prepare_move_raw();
#endif #endif
#ifdef SCARA #ifdef SCARA
void calculate_delta(float cartesian[3]); void calculate_delta(float cartesian[3]);

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#if EXTRUDERS > 4 #if EXTRUDERS > 4
#error The maximum number of EXTRUDERS is 4. #error The maximum number of EXTRUDERS in Marlin is 4.
#endif #endif
#ifdef TEMP_SENSOR_1_AS_REDUNDANT #ifdef TEMP_SENSOR_1_AS_REDUNDANT
@ -77,6 +77,13 @@
#endif // EXTRUDERS > 1 #endif // EXTRUDERS > 1
/**
* Limited number of servos
*/
#if NUM_SERVOS > 4
#error The maximum number of SERVOS in Marlin is 4.
#endif
/** /**
* Required LCD language * Required LCD language
*/ */
@ -235,9 +242,9 @@
*/ */
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
#if EXTRUDERS == 1 || defined(COREXY) \ #if EXTRUDERS == 1 || defined(COREXY) \
|| !defined(X2_ENABLE_PIN) || !defined(X2_STEP_PIN) || !defined(X2_DIR_PIN) \ || !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \
|| !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \ || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
|| !defined(X_MAX_PIN) || X_MAX_PIN < 0 || !HAS_X_MAX
#error Missing or invalid definitions for DUAL_X_CARRIAGE mode. #error Missing or invalid definitions for DUAL_X_CARRIAGE mode.
#endif #endif
#if X_HOME_DIR != -1 || X2_HOME_DIR != 1 #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
@ -260,6 +267,10 @@
#endif #endif
#endif #endif
#if HAS_FAN && CONTROLLERFAN_PIN == FAN_PIN
#error You cannot set CONTROLLERFAN_PIN equal to FAN_PIN
#endif
/** /**
* Test required HEATER defines * Test required HEATER defines
*/ */
@ -280,4 +291,11 @@
#error HEATER_0_PIN not defined for this board #error HEATER_0_PIN not defined for this board
#endif #endif
/**
* Warnings for old configurations
*/
#ifdef X_HOME_RETRACT_MM
#error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM
#endif
#endif //SANITYCHECK_H #endif //SANITYCHECK_H

View File

@ -412,7 +412,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -519,6 +519,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -189,9 +189,9 @@
// @section homing // @section homing
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -300,7 +300,7 @@ static void lcd_implementation_status_screen() {
// Fan // Fan
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(104,27); u8g.setPrintPos(104,27);
#if defined(FAN_PIN) && FAN_PIN > -1 #if HAS_FAN
int per = ((fanSpeed + 1) * 100) / 256; int per = ((fanSpeed + 1) * 100) / 256;
if (per) { if (per) {

View File

@ -364,7 +364,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -469,6 +469,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -364,7 +364,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -469,6 +469,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -387,7 +387,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -492,6 +492,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -392,7 +392,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -497,6 +497,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -416,7 +416,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -521,6 +521,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 3 #define X_HOME_BUMP_MM 3
#define Y_HOME_RETRACT_MM 3 #define Y_HOME_BUMP_MM 3
#define Z_HOME_RETRACT_MM 3 #define Z_HOME_BUMP_MM 3
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -386,7 +386,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -491,6 +491,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -414,7 +414,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -507,10 +507,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100 #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
#define Z_PROBE_ALLEN_KEY_RETRACT_X -64 #define Z_PROBE_ALLEN_KEY_STOW_X -64
#define Z_PROBE_ALLEN_KEY_RETRACT_Y 56 #define Z_PROBE_ALLEN_KEY_STOW_Y 56
#define Z_PROBE_ALLEN_KEY_RETRACT_Z 23 #define Z_PROBE_ALLEN_KEY_STOW_Z 23
#define Z_PROBE_ALLEN_KEY_RETRACT_DEPTH 20 #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
#endif #endif
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
@ -537,6 +537,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -414,7 +414,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -511,10 +511,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100 #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
#define Z_PROBE_ALLEN_KEY_RETRACT_X -64 #define Z_PROBE_ALLEN_KEY_STOW_X -64
#define Z_PROBE_ALLEN_KEY_RETRACT_Y 56 #define Z_PROBE_ALLEN_KEY_STOW_Y 56
#define Z_PROBE_ALLEN_KEY_RETRACT_Z 23 #define Z_PROBE_ALLEN_KEY_STOW_Z 23
#define Z_PROBE_ALLEN_KEY_RETRACT_DEPTH 20 #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
#endif #endif
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
@ -541,6 +541,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -384,7 +384,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -489,6 +489,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -386,7 +386,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling
// #define MESH_BED_LEVELING // Enable mesh bed leveling // #define MESH_BED_LEVELING // Enable mesh bed leveling
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_MIN_X 10 #define MESH_MIN_X 10
#define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
#define MESH_MIN_Y 10 #define MESH_MIN_Y 10
@ -491,6 +491,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop.
// If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below.
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
// To use a separte Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file.
// WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.
//#define Z_PROBE_ENDSTOP
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING

View File

@ -175,9 +175,9 @@
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_RETRACT_MM 5 #define X_HOME_BUMP_MM 5
#define Y_HOME_RETRACT_MM 5 #define Y_HOME_BUMP_MM 5
#define Z_HOME_RETRACT_MM 1 #define Z_HOME_BUMP_MM 1
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

View File

@ -1,6 +1,6 @@
#include "Marlin.h" #include "Marlin.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#define MESH_X_DIST ((MESH_MAX_X - MESH_MIN_X)/(MESH_NUM_X_POINTS - 1)) #define MESH_X_DIST ((MESH_MAX_X - MESH_MIN_X)/(MESH_NUM_X_POINTS - 1))
#define MESH_Y_DIST ((MESH_MAX_Y - MESH_MIN_Y)/(MESH_NUM_Y_POINTS - 1)) #define MESH_Y_DIST ((MESH_MAX_Y - MESH_MIN_Y)/(MESH_NUM_Y_POINTS - 1))

View File

@ -58,7 +58,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "language.h" #include "language.h"
#if defined(MESH_BED_LEVELING) #ifdef MESH_BED_LEVELING
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
@ -454,10 +454,10 @@ void check_axes_activity() {
#endif #endif
#ifdef BARICUDA #ifdef BARICUDA
#if defined(HEATER_1_PIN) && HEATER_1_PIN > -1 // HAS_HEATER_1 #if HAS_HEATER_1
analogWrite(HEATER_1_PIN,tail_valve_pressure); analogWrite(HEATER_1_PIN,tail_valve_pressure);
#endif #endif
#if defined(HEATER_2_PIN) && HEATER_2_PIN > -1 // HAS_HEATER_2 #if HAS_HEATER_2
analogWrite(HEATER_2_PIN,tail_e_to_p_pressure); analogWrite(HEATER_2_PIN,tail_e_to_p_pressure);
#endif #endif
#endif #endif

View File

@ -86,29 +86,29 @@ static volatile bool endstop_z_probe_hit = false; // Leaving this in even if Z_P
int motor_current_setting[3] = DEFAULT_PWM_MOTOR_CURRENT; int motor_current_setting[3] = DEFAULT_PWM_MOTOR_CURRENT;
#endif #endif
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0 #if HAS_X_MIN
static bool old_x_min_endstop = false; static bool old_x_min_endstop = false;
#endif #endif
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0 #if HAS_X_MAX
static bool old_x_max_endstop = false; static bool old_x_max_endstop = false;
#endif #endif
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0 #if HAS_Y_MIN
static bool old_y_min_endstop = false; static bool old_y_min_endstop = false;
#endif #endif
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0 #if HAS_Y_MAX
static bool old_y_max_endstop = false; static bool old_y_max_endstop = false;
#endif #endif
#if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0 #if HAS_Z_MIN
static bool old_z_min_endstop = false; static bool old_z_min_endstop = false;
#endif #endif
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0 #if HAS_Z_MAX
static bool old_z_max_endstop = false; static bool old_z_max_endstop = false;
#endif #endif
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
#if defined(Z2_MIN_PIN) && Z2_MIN_PIN >= 0 #if HAS_Z2_MIN
static bool old_z2_min_endstop = false; static bool old_z2_min_endstop = false;
#endif #endif
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0 #if HAS_Z2_MAX
static bool old_z2_max_endstop = false; static bool old_z2_max_endstop = false;
#endif #endif
#endif #endif
@ -483,7 +483,7 @@ ISR(TIMER1_COMPA_vect) {
if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1)) if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
#endif #endif
{ {
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0 #if HAS_X_MIN
UPDATE_ENDSTOP(x, X, min, MIN); UPDATE_ENDSTOP(x, X, min, MIN);
#endif #endif
} }
@ -494,7 +494,7 @@ ISR(TIMER1_COMPA_vect) {
if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1)) if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
#endif #endif
{ {
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0 #if HAS_X_MAX
UPDATE_ENDSTOP(x, X, max, MAX); UPDATE_ENDSTOP(x, X, max, MAX);
#endif #endif
} }
@ -509,12 +509,12 @@ ISR(TIMER1_COMPA_vect) {
if (TEST(out_bits, Y_AXIS)) // -direction if (TEST(out_bits, Y_AXIS)) // -direction
#endif #endif
{ // -direction { // -direction
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0 #if HAS_Y_MIN
UPDATE_ENDSTOP(y, Y, min, MIN); UPDATE_ENDSTOP(y, Y, min, MIN);
#endif #endif
} }
else { // +direction else { // +direction
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0 #if HAS_Y_MAX
UPDATE_ENDSTOP(y, Y, max, MAX); UPDATE_ENDSTOP(y, Y, max, MAX);
#endif #endif
} }
@ -530,13 +530,13 @@ ISR(TIMER1_COMPA_vect) {
if (check_endstops) { if (check_endstops) {
#if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0 #if HAS_Z_MIN
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
bool z_min_endstop = READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING, bool z_min_endstop = READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING,
z2_min_endstop = z2_min_endstop =
#if defined(Z2_MIN_PIN) && Z2_MIN_PIN >= 0 #if HAS_Z2_MIN
READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING
#else #else
z_min_endstop z_min_endstop
@ -585,13 +585,13 @@ ISR(TIMER1_COMPA_vect) {
if (check_endstops) { if (check_endstops) {
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0 #if HAS_Z_MAX
#ifdef Z_DUAL_ENDSTOPS #ifdef Z_DUAL_ENDSTOPS
bool z_max_endstop = READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING, bool z_max_endstop = READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING,
z2_max_endstop = z2_max_endstop =
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0 #if HAS_Z2_MAX
READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING
#else #else
z_max_endstop z_max_endstop
@ -871,127 +871,127 @@ void st_init() {
#endif #endif
// Initialize Dir Pins // Initialize Dir Pins
#if defined(X_DIR_PIN) && X_DIR_PIN >= 0 #if HAS_X_DIR
X_DIR_INIT; X_DIR_INIT;
#endif #endif
#if defined(X2_DIR_PIN) && X2_DIR_PIN >= 0 #if HAS_X2_DIR
X2_DIR_INIT; X2_DIR_INIT;
#endif #endif
#if defined(Y_DIR_PIN) && Y_DIR_PIN >= 0 #if HAS_Y_DIR
Y_DIR_INIT; Y_DIR_INIT;
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && Y2_DIR_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_DIR
Y2_DIR_INIT; Y2_DIR_INIT;
#endif #endif
#endif #endif
#if defined(Z_DIR_PIN) && Z_DIR_PIN >= 0 #if HAS_Z_DIR
Z_DIR_INIT; Z_DIR_INIT;
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_DIR_PIN) && Z2_DIR_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_DIR
Z2_DIR_INIT; Z2_DIR_INIT;
#endif #endif
#endif #endif
#if defined(E0_DIR_PIN) && E0_DIR_PIN >= 0 #if HAS_E0_DIR
E0_DIR_INIT; E0_DIR_INIT;
#endif #endif
#if defined(E1_DIR_PIN) && E1_DIR_PIN >= 0 #if HAS_E1_DIR
E1_DIR_INIT; E1_DIR_INIT;
#endif #endif
#if defined(E2_DIR_PIN) && E2_DIR_PIN >= 0 #if HAS_E2_DIR
E2_DIR_INIT; E2_DIR_INIT;
#endif #endif
#if defined(E3_DIR_PIN) && E3_DIR_PIN >= 0 #if HAS_E3_DIR
E3_DIR_INIT; E3_DIR_INIT;
#endif #endif
//Initialize Enable Pins - steppers default to disabled. //Initialize Enable Pins - steppers default to disabled.
#if defined(X_ENABLE_PIN) && X_ENABLE_PIN >= 0 #if HAS_X_ENABLE
X_ENABLE_INIT; X_ENABLE_INIT;
if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH); if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN >= 0 #if HAS_X2_ENABLE
X2_ENABLE_INIT; X2_ENABLE_INIT;
if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH); if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN >= 0 #if HAS_Y_ENABLE
Y_ENABLE_INIT; Y_ENABLE_INIT;
if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH); if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && Y2_ENABLE_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
Y2_ENABLE_INIT; Y2_ENABLE_INIT;
if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH); if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
#endif #endif
#endif #endif
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN >= 0 #if HAS_Z_ENABLE
Z_ENABLE_INIT; Z_ENABLE_INIT;
if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH); if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_ENABLE_PIN) && Z2_ENABLE_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_ENABLE
Z2_ENABLE_INIT; Z2_ENABLE_INIT;
if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH); if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
#endif #endif
#endif #endif
#if defined(E0_ENABLE_PIN) && E0_ENABLE_PIN >= 0 #if HAS_E0_ENABLE
E0_ENABLE_INIT; E0_ENABLE_INIT;
if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E1_ENABLE_PIN) && E1_ENABLE_PIN >= 0 #if HAS_E1_ENABLE
E1_ENABLE_INIT; E1_ENABLE_INIT;
if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E2_ENABLE_PIN) && E2_ENABLE_PIN >= 0 #if HAS_E2_ENABLE
E2_ENABLE_INIT; E2_ENABLE_INIT;
if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH);
#endif #endif
#if defined(E3_ENABLE_PIN) && E3_ENABLE_PIN >= 0 #if HAS_E3_ENABLE
E3_ENABLE_INIT; E3_ENABLE_INIT;
if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH); if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH);
#endif #endif
//endstops and pullups //endstops and pullups
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0 #if HAS_X_MIN
SET_INPUT(X_MIN_PIN); SET_INPUT(X_MIN_PIN);
#ifdef ENDSTOPPULLUP_XMIN #ifdef ENDSTOPPULLUP_XMIN
WRITE(X_MIN_PIN,HIGH); WRITE(X_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0 #if HAS_Y_MIN
SET_INPUT(Y_MIN_PIN); SET_INPUT(Y_MIN_PIN);
#ifdef ENDSTOPPULLUP_YMIN #ifdef ENDSTOPPULLUP_YMIN
WRITE(Y_MIN_PIN,HIGH); WRITE(Y_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0 #if HAS_Z_MIN
SET_INPUT(Z_MIN_PIN); SET_INPUT(Z_MIN_PIN);
#ifdef ENDSTOPPULLUP_ZMIN #ifdef ENDSTOPPULLUP_ZMIN
WRITE(Z_MIN_PIN,HIGH); WRITE(Z_MIN_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0 #if HAS_X_MAX
SET_INPUT(X_MAX_PIN); SET_INPUT(X_MAX_PIN);
#ifdef ENDSTOPPULLUP_XMAX #ifdef ENDSTOPPULLUP_XMAX
WRITE(X_MAX_PIN,HIGH); WRITE(X_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0 #if HAS_Y_MAX
SET_INPUT(Y_MAX_PIN); SET_INPUT(Y_MAX_PIN);
#ifdef ENDSTOPPULLUP_YMAX #ifdef ENDSTOPPULLUP_YMAX
WRITE(Y_MAX_PIN,HIGH); WRITE(Y_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0 #if HAS_Z_MAX
SET_INPUT(Z_MAX_PIN); SET_INPUT(Z_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z_MAX_PIN,HIGH); WRITE(Z_MAX_PIN,HIGH);
#endif #endif
#endif #endif
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0 #if HAS_Z2_MAX
SET_INPUT(Z2_MAX_PIN); SET_INPUT(Z2_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z2_MAX_PIN,HIGH); WRITE(Z2_MAX_PIN,HIGH);
@ -1013,36 +1013,36 @@ void st_init() {
#define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E) #define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E)
// Initialize Step Pins // Initialize Step Pins
#if defined(X_STEP_PIN) && X_STEP_PIN >= 0 #if HAS_X_STEP
AXIS_INIT(x, X, X); AXIS_INIT(x, X, X);
#endif #endif
#if defined(X2_STEP_PIN) && X2_STEP_PIN >= 0 #if HAS_X2_STEP
AXIS_INIT(x, X2, X); AXIS_INIT(x, X2, X);
#endif #endif
#if defined(Y_STEP_PIN) && Y_STEP_PIN >= 0 #if HAS_Y_STEP
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && Y2_STEP_PIN >= 0 #if defined(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_STEP
Y2_STEP_INIT; Y2_STEP_INIT;
Y2_STEP_WRITE(INVERT_Y_STEP_PIN); Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
#endif #endif
AXIS_INIT(y, Y, Y); AXIS_INIT(y, Y, Y);
#endif #endif
#if defined(Z_STEP_PIN) && Z_STEP_PIN >= 0 #if HAS_Z_STEP
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && Z2_STEP_PIN >= 0 #if defined(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_STEP
Z2_STEP_INIT; Z2_STEP_INIT;
Z2_STEP_WRITE(INVERT_Z_STEP_PIN); Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
#endif #endif
AXIS_INIT(z, Z, Z); AXIS_INIT(z, Z, Z);
#endif #endif
#if defined(E0_STEP_PIN) && E0_STEP_PIN >= 0 #if HAS_E0_STEP
E_AXIS_INIT(0); E_AXIS_INIT(0);
#endif #endif
#if defined(E1_STEP_PIN) && E1_STEP_PIN >= 0 #if HAS_E1_STEP
E_AXIS_INIT(1); E_AXIS_INIT(1);
#endif #endif
#if defined(E2_STEP_PIN) && E2_STEP_PIN >= 0 #if HAS_E2_STEP
E_AXIS_INIT(2); E_AXIS_INIT(2);
#endif #endif
#if defined(E3_STEP_PIN) && E3_STEP_PIN >= 0 #if HAS_E3_STEP
E_AXIS_INIT(3); E_AXIS_INIT(3);
#endif #endif
@ -1263,12 +1263,12 @@ void digipot_current(uint8_t driver, int current) {
} }
void microstep_init() { void microstep_init() {
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0 #if HAS_MICROSTEPS_E1
pinMode(E1_MS1_PIN,OUTPUT); pinMode(E1_MS1_PIN,OUTPUT);
pinMode(E1_MS2_PIN,OUTPUT); pinMode(E1_MS2_PIN,OUTPUT);
#endif #endif
#if defined(X_MS1_PIN) && X_MS1_PIN >= 0 #if HAS_MICROSTEPS
pinMode(X_MS1_PIN,OUTPUT); pinMode(X_MS1_PIN,OUTPUT);
pinMode(X_MS2_PIN,OUTPUT); pinMode(X_MS2_PIN,OUTPUT);
pinMode(Y_MS1_PIN,OUTPUT); pinMode(Y_MS1_PIN,OUTPUT);
@ -1289,7 +1289,7 @@ void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) {
case 1: digitalWrite(Y_MS1_PIN, ms1); break; case 1: digitalWrite(Y_MS1_PIN, ms1); break;
case 2: digitalWrite(Z_MS1_PIN, ms1); break; case 2: digitalWrite(Z_MS1_PIN, ms1); break;
case 3: digitalWrite(E0_MS1_PIN, ms1); break; case 3: digitalWrite(E0_MS1_PIN, ms1); break;
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0 #if HAS_MICROSTEPS_E1
case 4: digitalWrite(E1_MS1_PIN, ms1); break; case 4: digitalWrite(E1_MS1_PIN, ms1); break;
#endif #endif
} }
@ -1328,7 +1328,7 @@ void microstep_readings() {
SERIAL_PROTOCOLPGM("E0: "); SERIAL_PROTOCOLPGM("E0: ");
SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN)); SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN));
SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN)); SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN));
#if defined(E1_MS1_PIN) && E1_MS1_PIN >= 0 #if HAS_MICROSTEPS_E1
SERIAL_PROTOCOLPGM("E1: "); SERIAL_PROTOCOLPGM("E1: ");
SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN)); SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN));
SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN)); SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN));

View File

@ -53,7 +53,7 @@ extern float current_temperature_bed;
extern float redundant_temperature; extern float redundant_temperature;
#endif #endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 #if HAS_CONTROLLERFAN
extern unsigned char soft_pwm_bed; extern unsigned char soft_pwm_bed;
#endif #endif

View File

@ -64,14 +64,14 @@
#define LCD_CLICKED (buttons&EN_C) #define LCD_CLICKED (buttons&EN_C)
#ifdef REPRAPWORLD_KEYPAD #ifdef REPRAPWORLD_KEYPAD
#define EN_REPRAPWORLD_KEYPAD_F3 BIT(BLEN_REPRAPWORLD_KEYPAD_F3) #define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 BIT(BLEN_REPRAPWORLD_KEYPAD_F2) #define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
#define EN_REPRAPWORLD_KEYPAD_F1 BIT(BLEN_REPRAPWORLD_KEYPAD_F1) #define EN_REPRAPWORLD_KEYPAD_F1 (BIT(BLEN_REPRAPWORLD_KEYPAD_F1))
#define EN_REPRAPWORLD_KEYPAD_UP BIT(BLEN_REPRAPWORLD_KEYPAD_UP) #define EN_REPRAPWORLD_KEYPAD_UP (BIT(BLEN_REPRAPWORLD_KEYPAD_UP))
#define EN_REPRAPWORLD_KEYPAD_RIGHT BIT(BLEN_REPRAPWORLD_KEYPAD_RIGHT) #define EN_REPRAPWORLD_KEYPAD_RIGHT (BIT(BLEN_REPRAPWORLD_KEYPAD_RIGHT))
#define EN_REPRAPWORLD_KEYPAD_MIDDLE BIT(BLEN_REPRAPWORLD_KEYPAD_MIDDLE) #define EN_REPRAPWORLD_KEYPAD_MIDDLE (BIT(BLEN_REPRAPWORLD_KEYPAD_MIDDLE))
#define EN_REPRAPWORLD_KEYPAD_DOWN BIT(BLEN_REPRAPWORLD_KEYPAD_DOWN) #define EN_REPRAPWORLD_KEYPAD_DOWN (BIT(BLEN_REPRAPWORLD_KEYPAD_DOWN))
#define EN_REPRAPWORLD_KEYPAD_LEFT BIT(BLEN_REPRAPWORLD_KEYPAD_LEFT) #define EN_REPRAPWORLD_KEYPAD_LEFT (BIT(BLEN_REPRAPWORLD_KEYPAD_LEFT))
#define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1)) #define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
#define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2) #define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2)