@ -59,30 +59,49 @@
# endif
# endif
}
}
# elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
# elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
# include "../../module/endstops.h"
# include "../../module/endstops.h"
/**
/**
* M666 : For a Dual Endstop setup , set offsets for any 2 nd endstops .
* M666 : Set Dual Endstops offsets for X , Y , and / or Z .
* With no parameters report current offsets .
*/
*/
void GcodeSuite : : M666 ( ) {
inline void gcode_M666 ( ) {
bool report = true ;
# if ENABLED(X_DUAL_ENDSTOPS)
if ( parser . seen ( ' X ' ) ) {
endstops . x_endstop_adj = parser . value_linear_units ( ) ;
report = false ;
}
# endif
# if ENABLED(Y_DUAL_ENDSTOPS)
if ( parser . seen ( ' Y ' ) ) {
endstops . y_endstop_adj = parser . value_linear_units ( ) ;
report = false ;
}
# endif
# if ENABLED(Z_DUAL_ENDSTOPS)
if ( parser . seen ( ' Z ' ) ) {
endstops . z_endstop_adj = parser . value_linear_units ( ) ;
report = false ;
}
# endif
if ( report ) {
SERIAL_ECHOPGM ( " Dual Endstop Adjustment (mm): " ) ;
SERIAL_ECHOPGM ( " Dual Endstop Adjustment (mm): " ) ;
# if ENABLED(X_DUAL_ENDSTOPS)
# if ENABLED(X_DUAL_ENDSTOPS)
if ( parser . seen ( ' X ' ) ) endstops . x_endstop_adj = parser . value_linear_units ( ) ;
SERIAL_ECHOPAIR ( " X " , endstops . x_endstop_adj ) ;
SERIAL_ECHOPAIR ( " X " , endstops . x_endstop_adj ) ;
# endif
# endif
# if ENABLED(Y_DUAL_ENDSTOPS)
# if ENABLED(Y_DUAL_ENDSTOPS)
if ( parser . seen ( ' Y ' ) ) endstops . y_endstop_adj = parser . value_linear_units ( ) ;
SERIAL_ECHOPAIR ( " Y " , endstops . y_endstop_adj ) ;
SERIAL_ECHOPAIR ( " Y " , endstops . y_endstop_adj ) ;
# endif
# endif
# if ENABLED(Z_DUAL_ENDSTOPS)
# if ENABLED(Z_DUAL_ENDSTOPS)
if ( parser . seen ( ' Z ' ) ) endstops . z_endstop_adj = parser . value_linear_units ( ) ;
SERIAL_ECHOPAIR ( " Z " , endstops . z_endstop_adj ) ;
SERIAL_ECHOPAIR ( " Z " , endstops . z_endstop_adj ) ;
# endif
# endif
SERIAL_EOL ( ) ;
SERIAL_EOL ( ) ;
}
}
}
# endif
# endif // X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS
# endif // DELTA || Z_DUAL_ENDSTOPS
# endif // DELTA || Z_DUAL_ENDSTOPS