|
@@ -262,7 +262,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) || HAS_CURRENT_HOME(I) || HAS_CURRENT_HOME(J) || HAS_CURRENT_HOME(K) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z))
|
|
|
+ #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z)) || HAS_CURRENT_HOME(I) || HAS_CURRENT_HOME(J) || HAS_CURRENT_HOME(K)
|
|
|
#define HAS_HOMING_CURRENT 1
|
|
|
#endif
|
|
|
|
|
@@ -273,22 +273,22 @@ void GcodeSuite::G28() {
|
|
|
#if HAS_CURRENT_HOME(X)
|
|
|
const int16_t tmc_save_current_X = stepperX.getMilliamps();
|
|
|
stepperX.rms_current(X_CURRENT_HOME);
|
|
|
- if (DEBUGGING(LEVELING)) debug_current(F("X"), tmc_save_current_X, X_CURRENT_HOME);
|
|
|
+ if (DEBUGGING(LEVELING)) debug_current(F(STR_X), tmc_save_current_X, X_CURRENT_HOME);
|
|
|
#endif
|
|
|
#if HAS_CURRENT_HOME(X2)
|
|
|
const int16_t tmc_save_current_X2 = stepperX2.getMilliamps();
|
|
|
stepperX2.rms_current(X2_CURRENT_HOME);
|
|
|
- if (DEBUGGING(LEVELING)) debug_current(F("X2"), tmc_save_current_X2, X2_CURRENT_HOME);
|
|
|
+ if (DEBUGGING(LEVELING)) debug_current(F(STR_X2), tmc_save_current_X2, X2_CURRENT_HOME);
|
|
|
#endif
|
|
|
#if HAS_CURRENT_HOME(Y)
|
|
|
const int16_t tmc_save_current_Y = stepperY.getMilliamps();
|
|
|
stepperY.rms_current(Y_CURRENT_HOME);
|
|
|
- if (DEBUGGING(LEVELING)) debug_current(F("Y"), tmc_save_current_Y, Y_CURRENT_HOME);
|
|
|
+ if (DEBUGGING(LEVELING)) debug_current(F(STR_Y), tmc_save_current_Y, Y_CURRENT_HOME);
|
|
|
#endif
|
|
|
#if HAS_CURRENT_HOME(Y2)
|
|
|
const int16_t tmc_save_current_Y2 = stepperY2.getMilliamps();
|
|
|
stepperY2.rms_current(Y2_CURRENT_HOME);
|
|
|
- if (DEBUGGING(LEVELING)) debug_current(F("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
|
|
|
+ if (DEBUGGING(LEVELING)) debug_current(F(STR_Y2), tmc_save_current_Y2, Y2_CURRENT_HOME);
|
|
|
#endif
|
|
|
#if HAS_CURRENT_HOME(I)
|
|
|
const int16_t tmc_save_current_I = stepperI.getMilliamps();
|
|
@@ -308,7 +308,22 @@ void GcodeSuite::G28() {
|
|
|
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
|
|
|
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
|
|
|
stepperZ.rms_current(Z_CURRENT_HOME);
|
|
|
- if (DEBUGGING(LEVELING)) debug_current(F("Z"), tmc_save_current_Z, Z_CURRENT_HOME);
|
|
|
+ if (DEBUGGING(LEVELING)) debug_current(F(STR_Z), tmc_save_current_Z, Z_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(STR_I), 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(STR_J), 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(STR_K), tmc_save_current_K, K_CURRENT_HOME);
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
@@ -361,7 +376,7 @@ void GcodeSuite::G28() {
|
|
|
homeX = needX || parser.seen_test('X'),
|
|
|
homeY = needY || parser.seen_test('Y'),
|
|
|
homeZZ = homeZ,
|
|
|
- homeI = needI || parser.seen_test(AXIS4_NAME), homeJ = needJ || parser.seen_test(AXIS5_NAME), homeK = needK || parser.seen_test(AXIS6_NAME),
|
|
|
+ homeI = needI || parser.seen_test(AXIS4_NAME), homeJ = needJ || parser.seen_test(AXIS5_NAME), homeK = needK || parser.seen_test(AXIS6_NAME)
|
|
|
),
|
|
|
home_all = LINEAR_AXIS_GANG( // Home-all if all or none are flagged
|
|
|
homeX == homeX, && homeY == homeX, && homeZ == homeX,
|