From f8192f6e460d5daf272f0eb6ecc3e7017675791c Mon Sep 17 00:00:00 2001 From: Thomas Moore Date: Sat, 20 Jan 2018 09:43:59 -0600 Subject: [PATCH] Allow DELTA to compile with soft endstops disabled --- Marlin/Marlin_main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e9fe98d513..ecd3dfc073 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1343,12 +1343,14 @@ bool get_target_extruder_from_command(const uint16_t code) { #if ENABLED(DELTA) switch(axis) { - case X_AXIS: - case Y_AXIS: - // Get a minimum radius for clamping - soft_endstop_radius = MIN3(FABS(max(soft_endstop_min[X_AXIS], soft_endstop_min[Y_AXIS])), soft_endstop_max[X_AXIS], soft_endstop_max[Y_AXIS]); - soft_endstop_radius_2 = sq(soft_endstop_radius); - break; + #if HAS_SOFTWARE_ENDSTOPS + case X_AXIS: + case Y_AXIS: + // Get a minimum radius for clamping + soft_endstop_radius = MIN3(FABS(max(soft_endstop_min[X_AXIS], soft_endstop_min[Y_AXIS])), soft_endstop_max[X_AXIS], soft_endstop_max[Y_AXIS]); + soft_endstop_radius_2 = sq(soft_endstop_radius); + break; + #endif case Z_AXIS: delta_clip_start_height = soft_endstop_max[axis] - delta_safe_distance_from_top(); default: break;