Browse Source

Z_DUAL_ENDSTOP - make offset a configuration item

The offset for Z_DUAL_ENDSTOP (z_endstop_adj) is already in Marlin.
This PR just makes it a configuration item.

z_endstop_adj is initialized in two places so both had to be modified.
Scott Lahteine 7 years ago
parent
commit
62cbaa302e

+ 1
- 0
Marlin/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine/test this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 5
- 1
Marlin/configuration_store.cpp View File

@@ -963,7 +963,11 @@ void Config_ResetDefault() {
963 963
     COPY(delta_diagonal_rod_trim, drt);
964 964
     COPY(delta_tower_angle_trim, dta);
965 965
   #elif ENABLED(Z_DUAL_ENDSTOPS)
966
-    z_endstop_adj = 0;
966
+    #if defined(Z_DUAL_ENDSTOPS_ADJUSTMENT)
967
+      float z_endstop_adj = Z_DUAL_ENDSTOPS_ADJUSTMENT;
968
+    #else
969
+      float z_endstop_adj = 0;
970
+    #endif
967 971
   #endif
968 972
 
969 973
   #if ENABLED(ULTIPANEL)

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -298,6 +298,7 @@
298 298
 
299 299
   #if ENABLED(Z_DUAL_ENDSTOPS)
300 300
     #define Z2_USE_ENDSTOP _XMAX_
301
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
301 302
   #endif
302 303
 
303 304
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -293,6 +293,7 @@
293 293
 
294 294
   #if ENABLED(Z_DUAL_ENDSTOPS)
295 295
     #define Z2_USE_ENDSTOP _XMAX_
296
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
296 297
   #endif
297 298
 
298 299
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -290,6 +290,7 @@
290 290
 
291 291
   #if ENABLED(Z_DUAL_ENDSTOPS)
292 292
     #define Z2_USE_ENDSTOP _XMAX_
293
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
293 294
   #endif
294 295
 
295 296
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -285,6 +285,7 @@
285 285
 
286 286
   #if ENABLED(Z_DUAL_ENDSTOPS)
287 287
     #define Z2_USE_ENDSTOP _XMAX_
288
+    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0  // use M666 command to determine this value
288 289
   #endif
289 290
 
290 291
 #endif // Z_DUAL_STEPPER_DRIVERS

Loading…
Cancel
Save