Apply loop shorthand macros (#17159)
This commit is contained in:
@ -54,7 +54,7 @@ Nozzle nozzle;
|
||||
#endif
|
||||
|
||||
// Start the stroke pattern
|
||||
for (uint8_t i = 0; i < (strokes >> 1); i++) {
|
||||
LOOP_L_N(i, strokes >> 1) {
|
||||
do_blocking_move_to_xy(end);
|
||||
do_blocking_move_to_xy(start);
|
||||
}
|
||||
@ -91,7 +91,7 @@ Nozzle nozzle;
|
||||
const bool horiz = ABS(diff.x) >= ABS(diff.y); // Do a horizontal wipe?
|
||||
const float P = (horiz ? diff.x : diff.y) / zigs; // Period of each zig / zag
|
||||
const xyz_pos_t *side;
|
||||
for (uint8_t j = 0; j < strokes; j++) {
|
||||
LOOP_L_N(j, strokes) {
|
||||
for (int8_t i = 0; i < zigs; i++) {
|
||||
side = (i & 1) ? &end : &start;
|
||||
if (horiz)
|
||||
@ -134,8 +134,8 @@ Nozzle nozzle;
|
||||
do_blocking_move_to(start);
|
||||
#endif
|
||||
|
||||
for (uint8_t s = 0; s < strokes; s++)
|
||||
for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++)
|
||||
LOOP_L_N(s, strokes)
|
||||
LOOP_L_N(i, NOZZLE_CLEAN_CIRCLE_FN)
|
||||
do_blocking_move_to_xy(
|
||||
middle.x + sin((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius,
|
||||
middle.y + cos((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius
|
||||
|
Reference in New Issue
Block a user