From f863618b6668fc0c81d87f17f523aab9f001ef99 Mon Sep 17 00:00:00 2001 From: gjdodd <31553294+gjdodd@users.noreply.github.com> Date: Fri, 18 Jun 2021 01:37:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Extruders=200=20patch=20for=20PW?= =?UTF-8?q?M=20Motor=20Current=20(#22163)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/digipot/M907-M910.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index ee9801eda910e..118ad21564ace 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -67,8 +67,10 @@ void GcodeSuite::M907() { LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) digipot_i2c.set_current(i, parser.value_float()); // Additional extruders use B,C,D for channels 4,5,6. // TODO: Change these parameters because 'E' is used. B? - for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++) - if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float()); + #if HAS_EXTRUDERS + for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++) + if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float()); + #endif #endif #if ENABLED(HAS_MOTOR_CURRENT_DAC)