Skip to content

Commit

Permalink
Fix motor current array
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and HairingX committed Jun 16, 2021
1 parent b72652f commit edce856
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Marlin/src/feature/digipot/digipot_mcp4451.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ void digipot_i2c_init() {
Wire.begin();
#endif
// Set up initial currents as defined in Configuration_adv.h
static const float digipot_motor_current[] PROGMEM = TERN(DIGIPOT_USE_RAW_VALUES, DIGIPOT_MOTOR_CURRENT, DIGIPOT_I2C_MOTOR_CURRENTS);
static const float digipot_motor_current[] PROGMEM =
#if ENABLED(DIGIPOT_USE_RAW_VALUES)
DIGIPOT_MOTOR_CURRENT
#else
DIGIPOT_I2C_MOTOR_CURRENTS
#endif
;
LOOP_L_N(i, COUNT(digipot_motor_current))
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
}
Expand Down

0 comments on commit edce856

Please sign in to comment.