From 48761f2021db59e7b1b5c6db615b9f3c34551c64 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Oct 2016 13:32:30 -0500 Subject: [PATCH] Patch delta endstop adjustment config --- Marlin/Conditionals_post.h | 10 ++-------- Marlin/configuration_store.cpp | 7 ++++--- .../delta/biv2.5/Configuration.h | 2 ++ .../delta/generic/Configuration.h | 2 ++ .../delta/kossel_mini/Configuration.h | 2 ++ .../delta/kossel_pro/Configuration.h | 2 ++ .../delta/kossel_xl/Configuration.h | 2 ++ 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index e4c3c1bd03..12db8005a4 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -706,14 +706,8 @@ // Stepper pulse duration, in cycles #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND) - #ifndef DELTA_ENDSTOP_ADJ_X - #define DELTA_ENDSTOP_ADJ_X 0 - #endif - #ifndef DELTA_ENDSTOP_ADJ_Y - #define DELTA_ENDSTOP_ADJ_Y 0 - #endif - #ifndef DELTA_ENDSTOP_ADJ_Z - #define DELTA_ENDSTOP_ADJ_Z 0 + #ifndef DELTA_ENDSTOP_ADJ + #define DELTA_ENDSTOP_ADJ { 0 } #endif #endif // CONDITIONALS_POST_H diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 6543ce8cfc..cb958d9772 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -589,9 +589,10 @@ void Config_ResetDefault() { #endif #if ENABLED(DELTA) - endstop_adj[X_AXIS] = DELTA_ENDSTOP_ADJ_X; - endstop_adj[Y_AXIS] = DELTA_ENDSTOP_ADJ_Y; - endstop_adj[Z_AXIS] = DELTA_ENDSTOP_ADJ_Z; + const float adj[ABC] = DELTA_ENDSTOP_ADJ; + endstop_adj[A_AXIS] = adj[A_AXIS]; + endstop_adj[B_AXIS] = adj[B_AXIS]; + endstop_adj[C_AXIS] = adj[C_AXIS]; delta_radius = DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index a92103843f..d4ae0ae39a 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -441,6 +441,8 @@ // in ultralcd.cpp@lcd_delta_calibrate_menu() //#define DELTA_CALIBRATION_MENU + //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif // Enable this option for Toshiba steppers diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index f562389692..cb7888d3fb 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -441,6 +441,8 @@ // in ultralcd.cpp@lcd_delta_calibrate_menu() //#define DELTA_CALIBRATION_MENU + //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif // Enable this option for Toshiba steppers diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 7155072ae7..c965f9ac6d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -441,6 +441,8 @@ // in ultralcd.cpp@lcd_delta_calibrate_menu() //#define DELTA_CALIBRATION_MENU + //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif // Enable this option for Toshiba steppers diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 4b45957c2a..f0aa29e76e 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -430,6 +430,8 @@ // in ultralcd.cpp@lcd_delta_calibrate_menu() //#define DELTA_CALIBRATION_MENU + //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif // Enable this option for Toshiba steppers diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index ea10725414..0ecb38c05d 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -439,6 +439,8 @@ // in ultralcd.cpp@lcd_delta_calibrate_menu() //#define DELTA_CALIBRATION_MENU + //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 } + #endif // Enable this option for Toshiba steppers