Skip to content

Commit

Permalink
🩹 Extruders 0 patch for PWM Motor Current (MarlinFirmware#22163)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjdodd authored and ptoal committed Dec 16, 2021
1 parent 02572f6 commit fc9403b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/src/gcode/feature/digipot/M907-M910.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<index>?
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)
Expand Down

0 comments on commit fc9403b

Please sign in to comment.