From b8c112c490c5fd250cf83c3a8fb0b828a90965f9 Mon Sep 17 00:00:00 2001 From: esenapaj Date: Sat, 30 Jul 2016 19:34:46 +0900 Subject: [PATCH] Fix for PR #4453 (Improved MANUAL_[XYZ]_HOME_POS) --- Marlin/Conditionals_post.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 68efd43f4..8a51187e6 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -99,17 +99,33 @@ #ifdef MANUAL_X_HOME_POS #define X_HOME_POS MANUAL_X_HOME_POS #elif ENABLED(BED_CENTER_AT_0_0) - #define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5) + #if ENABLED(DELTA) + #define X_HOME_POS 0 + #else + #define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5) + #endif #else - #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) + #if ENABLED(DELTA) + #define X_HOME_POS ((X_MAX_LENGTH) * 0.5) + #else + #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) + #endif #endif #ifdef MANUAL_Y_HOME_POS #define Y_HOME_POS MANUAL_Y_HOME_POS #elif ENABLED(BED_CENTER_AT_0_0) - #define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5) + #if ENABLED(DELTA) + #define Y_HOME_POS 0 + #else + #define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5) + #endif #else - #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) + #if ENABLED(DELTA) + #define Y_HOME_POS ((Y_MAX_LENGTH) * 0.5) + #else + #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) + #endif #endif #ifdef MANUAL_Z_HOME_POS