|
@@ -543,6 +543,11 @@ void Planner::check_axes_activity() {
|
543
|
543
|
block->steps[A_AXIS] = labs(dx + dz);
|
544
|
544
|
block->steps[Y_AXIS] = labs(dy);
|
545
|
545
|
block->steps[C_AXIS] = labs(dx - dz);
|
|
546
|
+ #elif ENABLED(COREYZ)
|
|
547
|
+ // coreyz planning
|
|
548
|
+ block->steps[X_AXIS] = labs(dx);
|
|
549
|
+ block->steps[B_AXIS] = labs(dy + dz);
|
|
550
|
+ block->steps[C_AXIS] = labs(dy - dz);
|
546
|
551
|
#else
|
547
|
552
|
// default non-h-bot planning
|
548
|
553
|
block->steps[X_AXIS] = labs(dx);
|
|
@@ -581,7 +586,13 @@ void Planner::check_axes_activity() {
|
581
|
586
|
if (dy < 0) SBI(db, Y_AXIS);
|
582
|
587
|
if (dz < 0) SBI(db, Z_HEAD); // ...and Z
|
583
|
588
|
if (dx + dz < 0) SBI(db, A_AXIS); // Motor A direction
|
584
|
|
- if (dx - dz < 0) SBI(db, C_AXIS); // Motor B direction
|
|
589
|
+ if (dx - dz < 0) SBI(db, C_AXIS); // Motor C direction
|
|
590
|
+ #elif ENABLED(COREYZ)
|
|
591
|
+ if (dx < 0) SBI(db, X_AXIS);
|
|
592
|
+ if (dy < 0) SBI(db, Y_HEAD); // Save the real Extruder (head) direction in Y Axis
|
|
593
|
+ if (dz < 0) SBI(db, Z_HEAD); // ...and Z
|
|
594
|
+ if (dy + dz < 0) SBI(db, B_AXIS); // Motor B direction
|
|
595
|
+ if (dy - dz < 0) SBI(db, C_AXIS); // Motor C direction
|
585
|
596
|
#else
|
586
|
597
|
if (dx < 0) SBI(db, X_AXIS);
|
587
|
598
|
if (dy < 0) SBI(db, Y_AXIS);
|
|
@@ -698,20 +709,27 @@ void Planner::check_axes_activity() {
|
698
|
709
|
* So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head.
|
699
|
710
|
* Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
|
700
|
711
|
*/
|
701
|
|
- #if ENABLED(COREXY)
|
|
712
|
+ #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ)
|
702
|
713
|
float delta_mm[6];
|
703
|
|
- delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
|
704
|
|
- delta_mm[Y_HEAD] = dy / axis_steps_per_unit[B_AXIS];
|
705
|
|
- delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
|
706
|
|
- delta_mm[A_AXIS] = (dx + dy) / axis_steps_per_unit[A_AXIS];
|
707
|
|
- delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS];
|
708
|
|
- #elif ENABLED(COREXZ)
|
709
|
|
- float delta_mm[6];
|
710
|
|
- delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
|
711
|
|
- delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
|
712
|
|
- delta_mm[Z_HEAD] = dz / axis_steps_per_unit[C_AXIS];
|
713
|
|
- delta_mm[A_AXIS] = (dx + dz) / axis_steps_per_unit[A_AXIS];
|
714
|
|
- delta_mm[C_AXIS] = (dx - dz) / axis_steps_per_unit[C_AXIS];
|
|
714
|
+ #if ENABLED(COREXY)
|
|
715
|
+ delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
|
|
716
|
+ delta_mm[Y_HEAD] = dy / axis_steps_per_unit[B_AXIS];
|
|
717
|
+ delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
|
|
718
|
+ delta_mm[A_AXIS] = (dx + dy) / axis_steps_per_unit[A_AXIS];
|
|
719
|
+ delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS];
|
|
720
|
+ #elif ENABLED(COREXZ)
|
|
721
|
+ delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
|
|
722
|
+ delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
|
|
723
|
+ delta_mm[Z_HEAD] = dz / axis_steps_per_unit[C_AXIS];
|
|
724
|
+ delta_mm[A_AXIS] = (dx + dz) / axis_steps_per_unit[A_AXIS];
|
|
725
|
+ delta_mm[C_AXIS] = (dx - dz) / axis_steps_per_unit[C_AXIS];
|
|
726
|
+ #elif ENABLED(COREYZ)
|
|
727
|
+ delta_mm[X_AXIS] = dx / axis_steps_per_unit[A_AXIS];
|
|
728
|
+ delta_mm[Y_HEAD] = dy / axis_steps_per_unit[Y_AXIS];
|
|
729
|
+ delta_mm[Z_HEAD] = dz / axis_steps_per_unit[C_AXIS];
|
|
730
|
+ delta_mm[B_AXIS] = (dy + dz) / axis_steps_per_unit[B_AXIS];
|
|
731
|
+ delta_mm[C_AXIS] = (dy - dz) / axis_steps_per_unit[C_AXIS];
|
|
732
|
+ #endif
|
715
|
733
|
#else
|
716
|
734
|
float delta_mm[4];
|
717
|
735
|
delta_mm[X_AXIS] = dx / axis_steps_per_unit[X_AXIS];
|
|
@@ -729,6 +747,8 @@ void Planner::check_axes_activity() {
|
729
|
747
|
square(delta_mm[X_HEAD]) + square(delta_mm[Y_HEAD]) + square(delta_mm[Z_AXIS])
|
730
|
748
|
#elif ENABLED(COREXZ)
|
731
|
749
|
square(delta_mm[X_HEAD]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_HEAD])
|
|
750
|
+ #elif ENABLED(COREYZ)
|
|
751
|
+ square(delta_mm[X_AXIS]) + square(delta_mm[Y_HEAD]) + square(delta_mm[Z_HEAD])
|
732
|
752
|
#else
|
733
|
753
|
square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS])
|
734
|
754
|
#endif
|