🧑‍💻 Digipot settings cleanup

This commit is contained in:
Scott Lahteine 2025-03-30 14:57:01 -05:00
parent 73ed54308a
commit 43177af21c

View file

@ -3712,7 +3712,7 @@ void MarlinSettings::reset() {
#if HAS_MOTOR_CURRENT_PWM
constexpr uint32_t tmp_motor_current_setting[MOTOR_CURRENT_COUNT] = PWM_MOTOR_CURRENT;
for (uint8_t q = 0; q < MOTOR_CURRENT_COUNT; ++q)
stepper.set_digipot_current(q, (stepper.motor_current_setting[q] = tmp_motor_current_setting[q]));
stepper.set_digipot_current(q, tmp_motor_current_setting[q]);
#endif
//
@ -3720,10 +3720,8 @@ void MarlinSettings::reset() {
//
#if HAS_MOTOR_CURRENT_SPI
static constexpr uint32_t tmp_motor_current_setting[] = DIGIPOT_MOTOR_CURRENT;
DEBUG_ECHOLNPGM("Writing Digipot");
for (uint8_t q = 0; q < COUNT(tmp_motor_current_setting); ++q)
stepper.set_digipot_current(q, tmp_motor_current_setting[q]);
DEBUG_ECHOLNPGM("Digipot Written");
#endif
//