🧑‍💻 Remove LOOP macros (#25917)

This commit is contained in:
Scott Lahteine
2023-06-02 14:30:34 -05:00
committed by GitHub
parent 2691167afe
commit 86c811660e
122 changed files with 362 additions and 367 deletions

View File

@@ -2842,7 +2842,7 @@ void Stepper::init() {
#if MB(ALLIGATOR)
const float motor_current[] = MOTOR_CURRENT;
unsigned int digipot_motor = 0;
LOOP_L_N(i, 3 + EXTRUDERS) {
for (uint8_t i = 0; i < 3 + EXTRUDERS; ++i) {
digipot_motor = 255 * (motor_current[i] / 2.5);
dac084s085::setValue(i, digipot_motor);
}
@@ -3725,7 +3725,7 @@ void Stepper::report_positions() {
void Stepper::refresh_motor_power() {
if (!initialized) return;
LOOP_L_N(i, COUNT(motor_current_setting)) {
for (uint8_t i = 0; i < COUNT(motor_current_setting); ++i) {
switch (i) {
#if ANY_PIN(MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K, MOTOR_CURRENT_PWM_U, MOTOR_CURRENT_PWM_V, MOTOR_CURRENT_PWM_W)
case 0:
@@ -3821,7 +3821,7 @@ void Stepper::report_positions() {
SPI.begin();
SET_OUTPUT(DIGIPOTSS_PIN);
LOOP_L_N(i, COUNT(motor_current_setting))
for (uint8_t i = 0; i < COUNT(motor_current_setting); ++i)
set_digipot_current(i, motor_current_setting[i]);
#elif HAS_MOTOR_CURRENT_PWM