mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
parent
72b99bf1ba
commit
170f77fada
@ -264,7 +264,7 @@ void GcodeSuite::G28() {
|
||||
reset_stepper_timeout();
|
||||
|
||||
#define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT)
|
||||
#if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z))
|
||||
#if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || HAS_CURRENT_HOME(I) || HAS_CURRENT_HOME(J) || HAS_CURRENT_HOME(K) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z))
|
||||
#define HAS_HOMING_CURRENT 1
|
||||
#endif
|
||||
|
||||
@ -292,6 +292,21 @@ void GcodeSuite::G28() {
|
||||
stepperY2.rms_current(Y2_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(I)
|
||||
const int16_t tmc_save_current_I = stepperI.getMilliamps();
|
||||
stepperI.rms_current(I_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F(AXIS4_STR), tmc_save_current_I, I_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(J)
|
||||
const int16_t tmc_save_current_J = stepperJ.getMilliamps();
|
||||
stepperJ.rms_current(J_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F(AXIS5_STR), tmc_save_current_J, J_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(K)
|
||||
const int16_t tmc_save_current_K = stepperK.getMilliamps();
|
||||
stepperK.rms_current(K_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F(AXIS6_STR), tmc_save_current_K, K_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
|
||||
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
|
||||
stepperZ.rms_current(Z_CURRENT_HOME);
|
||||
|
Loading…
Reference in New Issue
Block a user