@@ -257,11 +257,15 @@ void Planner::init() {
257
257
position.reset ();
258
258
TERN_ (HAS_POSITION_FLOAT, position_float.reset ());
259
259
TERN_ (IS_KINEMATIC, position_cart.reset ());
260
+
260
261
previous_speed.reset ();
261
262
previous_nominal_speed = 0 ;
263
+
262
264
TERN_ (ABL_PLANAR, bed_level_matrix.set_to_identity ());
265
+
263
266
clear_block_buffer ();
264
267
delay_before_delivering = 0 ;
268
+
265
269
#if ENABLED(DIRECT_STEPPING)
266
270
last_page_step_rate = 0 ;
267
271
last_page_dir.reset ();
@@ -1970,23 +1974,21 @@ bool Planner::_populate_block(
1970
1974
dm.hy = (dist.b > 0 ); // ...and Y
1971
1975
TERN_ (HAS_Z_AXIS, dm.z = (dist.c > 0 ));
1972
1976
#endif
1973
- #if IS_CORE
1974
- #if CORE_IS_XY
1975
- dm.a = (dist.a + dist.b > 0 ); // Motor A direction
1976
- dm.b = (CORESIGN (dist.a - dist.b ) > 0 ); // Motor B direction
1977
- #elif CORE_IS_XZ
1978
- dm.hx = (dist.a > 0 ); // Save the toolhead's true direction in X
1979
- dm.y = (dist.b > 0 );
1980
- dm.hz = (dist.c > 0 ); // ...and Z
1981
- dm.a = (dist.a + dist.c > 0 ); // Motor A direction
1982
- dm.c = (CORESIGN (dist.a - dist.c ) > 0 ); // Motor C direction
1983
- #elif CORE_IS_YZ
1984
- dm.x = (dist.a > 0 );
1985
- dm.hy = (dist.b > 0 ); // Save the toolhead's true direction in Y
1986
- dm.hz = (dist.c > 0 ); // ...and Z
1987
- dm.b = (dist.b + dist.c > 0 ); // Motor B direction
1988
- dm.c = (CORESIGN (dist.b - dist.c ) > 0 ); // Motor C direction
1989
- #endif
1977
+ #if CORE_IS_XY
1978
+ dm.a = (dist.a + dist.b > 0 ); // Motor A direction
1979
+ dm.b = (CORESIGN (dist.a - dist.b ) > 0 ); // Motor B direction
1980
+ #elif CORE_IS_XZ
1981
+ dm.hx = (dist.a > 0 ); // Save the toolhead's true direction in X
1982
+ dm.y = (dist.b > 0 );
1983
+ dm.hz = (dist.c > 0 ); // ...and Z
1984
+ dm.a = (dist.a + dist.c > 0 ); // Motor A direction
1985
+ dm.c = (CORESIGN (dist.a - dist.c ) > 0 ); // Motor C direction
1986
+ #elif CORE_IS_YZ
1987
+ dm.x = (dist.a > 0 );
1988
+ dm.hy = (dist.b > 0 ); // Save the toolhead's true direction in Y
1989
+ dm.hz = (dist.c > 0 ); // ...and Z
1990
+ dm.b = (dist.b + dist.c > 0 ); // Motor B direction
1991
+ dm.c = (CORESIGN (dist.b - dist.c ) > 0 ); // Motor C direction
1990
1992
#elif ENABLED(MARKFORGED_XY)
1991
1993
dm.a = (dist.a TERN (MARKFORGED_INVERSE, -, +) dist.b > 0 ); // Motor A direction
1992
1994
dm.b = (dist.b > 0 ); // Motor B direction
@@ -2090,23 +2092,21 @@ bool Planner::_populate_block(
2090
2092
dist_mm.head .y = dist.b * mm_per_step[B_AXIS];
2091
2093
TERN_ (HAS_Z_AXIS, dist_mm.z = dist.c * mm_per_step[Z_AXIS]);
2092
2094
#endif
2093
- #if IS_CORE
2094
- #if CORE_IS_XY
2095
- dist_mm.a = (dist.a + dist.b ) * mm_per_step[A_AXIS];
2096
- dist_mm.b = CORESIGN (dist.a - dist.b ) * mm_per_step[B_AXIS];
2097
- #elif CORE_IS_XZ
2098
- dist_mm.head .x = dist.a * mm_per_step[A_AXIS];
2099
- dist_mm.y = dist.b * mm_per_step[Y_AXIS];
2100
- dist_mm.head .z = dist.c * mm_per_step[C_AXIS];
2101
- dist_mm.a = (dist.a + dist.c ) * mm_per_step[A_AXIS];
2102
- dist_mm.c = CORESIGN (dist.a - dist.c ) * mm_per_step[C_AXIS];
2103
- #elif CORE_IS_YZ
2104
- dist_mm.x = dist.a * mm_per_step[X_AXIS];
2105
- dist_mm.head .y = dist.b * mm_per_step[B_AXIS];
2106
- dist_mm.head .z = dist.c * mm_per_step[C_AXIS];
2107
- dist_mm.b = (dist.b + dist.c ) * mm_per_step[B_AXIS];
2108
- dist_mm.c = CORESIGN (dist.b - dist.c ) * mm_per_step[C_AXIS];
2109
- #endif
2095
+ #if CORE_IS_XY
2096
+ dist_mm.a = (dist.a + dist.b ) * mm_per_step[A_AXIS];
2097
+ dist_mm.b = CORESIGN (dist.a - dist.b ) * mm_per_step[B_AXIS];
2098
+ #elif CORE_IS_XZ
2099
+ dist_mm.head .x = dist.a * mm_per_step[A_AXIS];
2100
+ dist_mm.y = dist.b * mm_per_step[Y_AXIS];
2101
+ dist_mm.head .z = dist.c * mm_per_step[C_AXIS];
2102
+ dist_mm.a = (dist.a + dist.c ) * mm_per_step[A_AXIS];
2103
+ dist_mm.c = CORESIGN (dist.a - dist.c ) * mm_per_step[C_AXIS];
2104
+ #elif CORE_IS_YZ
2105
+ dist_mm.x = dist.a * mm_per_step[X_AXIS];
2106
+ dist_mm.head .y = dist.b * mm_per_step[B_AXIS];
2107
+ dist_mm.head .z = dist.c * mm_per_step[C_AXIS];
2108
+ dist_mm.b = (dist.b + dist.c ) * mm_per_step[B_AXIS];
2109
+ dist_mm.c = CORESIGN (dist.b - dist.c ) * mm_per_step[C_AXIS];
2110
2110
#elif ENABLED(MARKFORGED_XY)
2111
2111
dist_mm.a = (dist.a TERN (MARKFORGED_INVERSE, +, -) dist.b ) * mm_per_step[A_AXIS];
2112
2112
dist_mm.b = dist.b * mm_per_step[B_AXIS];
@@ -2540,6 +2540,7 @@ bool Planner::_populate_block(
2540
2540
#if DISABLED(S_CURVE_ACCELERATION)
2541
2541
block->acceleration_rate = (uint32_t )(accel * (float (1UL << 24 ) / (STEPPER_TIMER_RATE)));
2542
2542
#endif
2543
+
2543
2544
#if ENABLED(LIN_ADVANCE)
2544
2545
block->la_advance_rate = 0 ;
2545
2546
block->la_scaling = 0 ;
0 commit comments