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.
This commit is contained in:
Scott Lahteine 2017-03-20 06:10:31 -05:00 committed by Bob-the-Kuhn
parent 3b6333c613
commit 62cbaa302e
19 changed files with 23 additions and 1 deletions

View File

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

View File

@ -963,7 +963,11 @@ void Config_ResetDefault() {
COPY(delta_diagonal_rod_trim, drt); COPY(delta_diagonal_rod_trim, drt);
COPY(delta_tower_angle_trim, dta); COPY(delta_tower_angle_trim, dta);
#elif ENABLED(Z_DUAL_ENDSTOPS) #elif ENABLED(Z_DUAL_ENDSTOPS)
z_endstop_adj = 0; #if defined(Z_DUAL_ENDSTOPS_ADJUSTMENT)
float z_endstop_adj = Z_DUAL_ENDSTOPS_ADJUSTMENT;
#else
float z_endstop_adj = 0;
#endif
#endif #endif
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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