From 28f1e309a240e0433a6ebb002b2ccbe1f6150cf4 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 5 Mar 2019 17:44:47 +0100 Subject: [PATCH] Fix compiler warning: 'old_x_max_endstop' defined but not used Fix compiler warning: 'old_y_max_endstop' defined but not used --- Firmware/stepper.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index bb5d22f75..c21a4e9f1 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -92,10 +92,15 @@ bool abort_on_endstop_hit = false; int motor_current_setting_loud[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD; #endif -static bool old_x_min_endstop=false; +#if ( (defined(X_MAX_PIN) && (X_MAX_PIN > -1)) || defined(TMC2130_SG_HOMING) ) && !defined(DEBUG_DISABLE_XMAXLIMIT) static bool old_x_max_endstop=false; -static bool old_y_min_endstop=false; +#endif +#if ( (defined(Y_MAX_PIN) && (Y_MAX_PIN > -1)) || defined(TMC2130_SG_HOMING) ) && !defined(DEBUG_DISABLE_YMAXLIMIT) static bool old_y_max_endstop=false; +#endif + +static bool old_x_min_endstop=false; +static bool old_y_min_endstop=false; static bool old_z_min_endstop=false; static bool old_z_max_endstop=false;