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 8 years ago
parent
commit
62cbaa302e

+ 1
- 0
Marlin/Configuration_adv.h View File

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

+ 5
- 1
Marlin/configuration_store.cpp View File

963
     COPY(delta_diagonal_rod_trim, drt);
963
     COPY(delta_diagonal_rod_trim, drt);
964
     COPY(delta_tower_angle_trim, dta);
964
     COPY(delta_tower_angle_trim, dta);
965
   #elif ENABLED(Z_DUAL_ENDSTOPS)
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
   #endif
971
   #endif
968
 
972
 
969
   #if ENABLED(ULTIPANEL)
973
   #if ENABLED(ULTIPANEL)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save