Fix for Z-endstop failure in .22

master
Marcio Teixeira 7 years ago
parent c4af48013e
commit 1fc0a8f206

@ -37,7 +37,7 @@
#error Must specify model and toolhead. Please see "Configuration_LulzBot.h" for directions. #error Must specify model and toolhead. Please see "Configuration_LulzBot.h" for directions.
#endif #endif
#define LULZBOT_FW_VERSION ".22" #define LULZBOT_FW_VERSION ".23"
// Select options based on printer model // Select options based on printer model
@ -141,6 +141,12 @@
#define LULZBOT_Z_MIN_PROBE_ENDSTOP #define LULZBOT_Z_MIN_PROBE_ENDSTOP
#define LULZBOT_Z_MIN_PROBE_PIN SERVO0_PIN // Digital pin 22 #define LULZBOT_Z_MIN_PROBE_PIN SERVO0_PIN // Digital pin 22
#define LULZBOT_BAUDRATE 250000 #define LULZBOT_BAUDRATE 250000
// On the TAZ, the bed washers are on Z_MIN_PROBE while the
// Z-Home button is on Z_MIN, yet we need both to be disabled
// when z_probe_enabled is false. We added this special case
// to "endstops.cpp"
#define LULZBOT_Z_MIN_USES_Z_PROBE_ENABLED
#endif #endif
#define LULZBOT_USE_CONTROLLER_FAN #define LULZBOT_USE_CONTROLLER_FAN
@ -298,35 +304,39 @@
* *
* On TAZ: * On TAZ:
* Z_MIN_PIN corresponds to the Z-Home push button. * Z_MIN_PIN corresponds to the Z-Home push button.
* LULZBOT_Z_MIN_PROBE_PIN are the bed washers. * Z_MIN_PROBE_PIN are the bed washers.
*/ */
#if defined(LULZBOT_MINI_BED) #if defined(LULZBOT_MINI_BED)
#define LULZBOT_ENABLE_PROBE_PINS(enable) { \ #define LULZBOT_ENABLE_PROBE_PINS(enable) { \
if(enable) { \ if(enable) { \
/* Set as inputs with pull-up resistor */ \ /* Set as inputs with pull-up resistor */ \
SET_INPUT(Z_MIN_PIN); \ SET_INPUT(Z_MIN_PIN); \
WRITE(Z_MIN_PIN, HIGH); \ WRITE(Z_MIN_PIN, HIGH); \
} else { \ } else { \
/* Ground to prevent EMI */ \ /* Ground to prevent EMI */ \
SET_OUTPUT(Z_MIN_PIN); \ SET_OUTPUT(Z_MIN_PIN); \
WRITE(Z_MIN_PIN, LOW); \ WRITE(Z_MIN_PIN, LOW); \
} \ } \
} }
#elif defined(LULZBOT_TAZ_BED) #elif defined(LULZBOT_TAZ_BED)
#define LULZBOT_ENABLE_PROBE_PINS(enable) { \ #define LULZBOT_ENABLE_PROBE_PINS(enable) { \
if(enable) { \ if(enable) { \
/* Set both as inputs with pull-up resistor */ \ /* Set both as inputs with pull-up resistor */ \
SET_INPUT(LULZBOT_Z_MIN_PROBE_PIN); \ SET_INPUT(LULZBOT_Z_MIN_PROBE_PIN); \
WRITE(LULZBOT_Z_MIN_PROBE_PIN, HIGH); \ WRITE(LULZBOT_Z_MIN_PROBE_PIN, HIGH); \
SET_INPUT(Z_MIN_PIN); \ SET_INPUT(Z_MIN_PIN); \
WRITE(Z_MIN_PIN, HIGH); \ WRITE(Z_MIN_PIN, HIGH); \
/* The following is required since Marlin would \
* not normally deploy the probe for Z-Min */ \
endstops.enable_z_probe(true); \
} else { \ } else { \
/* Ground both pins to prevent EMI */ \ /* Ground both pins to prevent EMI */ \
SET_OUTPUT(LULZBOT_Z_MIN_PROBE_PIN); \ SET_OUTPUT(LULZBOT_Z_MIN_PROBE_PIN); \
WRITE(LULZBOT_Z_MIN_PROBE_PIN, LOW); \ WRITE(LULZBOT_Z_MIN_PROBE_PIN, LOW); \
SET_OUTPUT(Z_MIN_PIN); \ SET_OUTPUT(Z_MIN_PIN); \
WRITE(Z_MIN_PIN, LOW); \ WRITE(Z_MIN_PIN, LOW); \
endstops.enable_z_probe(false); \
} \ } \
} }
#endif #endif

@ -3917,6 +3917,8 @@ inline void gcode_G28(const bool always_home_all) {
#endif // !DELTA (gcode_G28) #endif // !DELTA (gcode_G28)
LULZBOT_AFTER_Z_HOME_ACTION // This must happen before endstops.not_homing()
endstops.not_homing(); endstops.not_homing();
#if ENABLED(DELTA) && ENABLED(DELTA_HOME_TO_SAFE_ZONE) #if ENABLED(DELTA) && ENABLED(DELTA_HOME_TO_SAFE_ZONE)
@ -3935,8 +3937,6 @@ inline void gcode_G28(const bool always_home_all) {
tool_change(old_tool_index, 0, true); tool_change(old_tool_index, 0, true);
#endif #endif
LULZBOT_AFTER_Z_HOME_ACTION
lcd_refresh(); lcd_refresh();
report_current_position(); report_current_position();

@ -409,7 +409,7 @@ void Endstops::update() {
#else // !Z_DUAL_ENDSTOPS #else // !Z_DUAL_ENDSTOPS
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || defined(LULZBOT_Z_MIN_USES_Z_PROBE_ENABLED)
if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN); if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
#else #else
UPDATE_ENDSTOP(Z, MIN); UPDATE_ENDSTOP(Z, MIN);

Loading…
Cancel
Save