Allow G2_PWM to be slimmer

This commit is contained in:
Scott Lahteine
2020-03-25 19:17:50 -05:00
parent adb6334ba0
commit 0175189c34
2 changed files with 105 additions and 44 deletions

View File

@ -2696,7 +2696,7 @@ void MarlinSettings::reset() {
#if HAS_MOTOR_CURRENT_PWM
constexpr uint32_t tmp_motor_current_setting[3] = PWM_MOTOR_CURRENT;
for (uint8_t q = 3; q--;)
LOOP_L_N(q, 3)
stepper.digipot_current(q, (stepper.motor_current_setting[q] = tmp_motor_current_setting[q]));
#endif