Code cleanup around MOTOR_CURRENT_PWM options

This commit is contained in:
Scott Lahteine
2016-03-25 04:05:07 -07:00
parent 122bdd187f
commit 5d8036e554
4 changed files with 52 additions and 41 deletions

View File

@@ -5729,13 +5729,13 @@ inline void gcode_M907() {
if (code_seen('B')) digipot_current(4, code_value());
if (code_seen('S')) for (int i = 0; i <= 4; i++) digipot_current(i, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
if (code_seen('X')) digipot_current(0, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_Z_PIN
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
if (code_seen('Z')) digipot_current(1, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_E_PIN
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
if (code_seen('E')) digipot_current(2, code_value());
#endif
#if ENABLED(DIGIPOT_I2C)