🔧 Undef motor current PWM for unused axes

This commit is contained in:
Scott Lahteine
2024-05-12 13:08:17 -05:00
parent dabcea991f
commit 08fe8a3076
6 changed files with 50 additions and 10 deletions

View File

@@ -3906,7 +3906,7 @@ void Stepper::report_positions() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
case 1:
#endif
#if ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_E0, MOTOR_CURRENT_PWM_E1)
#if HAS_MOTOR_CURRENT_PWM_E
case 2:
#endif
set_digipot_current(i, motor_current_setting[i]);
@@ -3973,7 +3973,7 @@ void Stepper::report_positions() {
#endif
break;
case 2:
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
_WRITE_CURRENT_PWM(E);
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E0)
@@ -4036,7 +4036,7 @@ void Stepper::report_positions() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
INIT_CURRENT_PWM(Z);
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
INIT_CURRENT_PWM(E);
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E0)