Merge pull request #9384 from tcm0116/2.0.x-retract

[2.0.x] Clear retracted status when homing the Z axis
This commit is contained in:
Scott Lahteine 2018-02-01 23:36:36 -06:00 committed by GitHub
commit f8227abf1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,10 @@
#include "../feature/tmc_util.h" #include "../feature/tmc_util.h"
#endif #endif
#if ENABLED(FWRETRACT)
#include "../feature/fwretract.h"
#endif
#define XYZ_CONSTS(type, array, CONFIG) const PROGMEM type array##_P[XYZ] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG } #define XYZ_CONSTS(type, array, CONFIG) const PROGMEM type array##_P[XYZ] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }
XYZ_CONSTS(float, base_min_pos, MIN_POS); XYZ_CONSTS(float, base_min_pos, MIN_POS);
@ -1285,6 +1289,12 @@ void homeaxis(const AxisEnum axis) {
if (axis == Z_AXIS && STOW_PROBE()) return; if (axis == Z_AXIS && STOW_PROBE()) return;
#endif #endif
// Clear retracted status if homing the Z axis
#if ENABLED(FWRETRACT)
if (axis == Z_AXIS)
for (uint8_t i = 0; i < EXTRUDERS; i++) fwretract.retracted[i] = false;
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("<<< homeaxis(", axis_codes[axis]); SERIAL_ECHOPAIR("<<< homeaxis(", axis_codes[axis]);