Quellcode durchsuchen

MarkForged kinematics (#19235)

Victor Sokolov vor 4 Jahren
Ursprung
Commit
e97e6865c3
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 2
- 1
Marlin/Configuration.h Datei anzeigen

@@ -608,7 +608,7 @@
608 608
 
609 609
 // @section machine
610 610
 
611
-// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
611
+// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
612 612
 // either in the usual order or reversed
613 613
 //#define COREXY
614 614
 //#define COREXZ
@@ -616,6 +616,7 @@
616 616
 //#define COREYX
617 617
 //#define COREZX
618 618
 //#define COREZY
619
+//#define MARKFORGED_XY  // MarkForged. See https://reprap.org/forum/read.php?152,504042
619 620
 
620 621
 //===========================================================================
621 622
 //============================== Endstop Settings ===========================

+ 5
- 4
Marlin/src/core/utility.cpp Datei anzeigen

@@ -57,10 +57,11 @@ void safe_delay(millis_t ms) {
57 57
 
58 58
   void log_machine_info() {
59 59
     SERIAL_ECHOLNPGM("Machine Type: "
60
-      TERN_(DELTA, "Delta")
61
-      TERN_(IS_SCARA, "SCARA")
62
-      TERN_(IS_CORE, "Core")
63
-      TERN_(IS_CARTESIAN, "Cartesian")
60
+      TERN_(DELTA,         "Delta")
61
+      TERN_(IS_SCARA,      "SCARA")
62
+      TERN_(IS_CORE,       "Core")
63
+      TERN_(MARKFORGED_XY, "MarkForged")
64
+      TERN_(IS_CARTESIAN,  "Cartesian")
64 65
     );
65 66
 
66 67
     SERIAL_ECHOLNPGM("Probe: "

+ 5
- 4
Marlin/src/gcode/host/M360.cpp Datei anzeigen

@@ -145,10 +145,11 @@ void GcodeSuite::M360() {
145 145
 
146 146
   config_prefix(PSTR("PrinterType"));
147 147
   SERIAL_ECHOLNPGM(
148
-    TERN_(DELTA,        "Delta")
149
-    TERN_(IS_SCARA,     "SCARA")
150
-    TERN_(IS_CORE,      "Core")
151
-    TERN_(IS_CARTESIAN, "Cartesian")
148
+    TERN_(DELTA,         "Delta")
149
+    TERN_(IS_SCARA,      "SCARA")
150
+    TERN_(IS_CORE,       "Core")
151
+    TERN_(MARKFORGED_XY, "MarkForged")
152
+    TERN_(IS_CARTESIAN,  "Cartesian")
152 153
   );
153 154
 
154 155
   //

+ 6
- 1
Marlin/src/inc/Conditionals_post.h Datei anzeigen

@@ -149,11 +149,16 @@
149 149
     #define CORE_AXIS_2 C_AXIS
150 150
   #endif
151 151
   #define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n))
152
+#elif ENABLED(MARKFORGED_XY)
153
+  // Markforged kinematics
154
+  #define CORE_AXIS_1 A_AXIS
155
+  #define CORE_AXIS_2 B_AXIS
156
+  #define NORMAL_AXIS Z_AXIS
152 157
 #endif
153 158
 
154 159
 // Calibration codes only for non-core axes
155 160
 #if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE)
156
-  #if IS_CORE
161
+  #if EITHER(IS_CORE, MARKFORGED_XY)
157 162
     #define X_AXIS_INDEX 0
158 163
     #define Y_AXIS_INDEX 1
159 164
     #define Z_AXIS_INDEX 2

+ 13
- 4
Marlin/src/inc/SanityCheck.h Datei anzeigen

@@ -764,6 +764,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
764 764
 #if ENABLED(BABYSTEPPING)
765 765
   #if ENABLED(SCARA)
766 766
     #error "BABYSTEPPING is not implemented for SCARA yet."
767
+  #elif BOTH(MARKFORGED_XY, BABYSTEP_XY)
768
+    #error "BABYSTEPPING only implemented for Z axis on MarkForged."
767 769
   #elif BOTH(DELTA, BABYSTEP_XY)
768 770
     #error "BABYSTEPPING only implemented for Z axis on deltabots."
769 771
   #elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING)
@@ -1155,8 +1157,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1155 1157
   + ENABLED(COREYZ) \
1156 1158
   + ENABLED(COREYX) \
1157 1159
   + ENABLED(COREZX) \
1158
-  + ENABLED(COREZY)
1159
-  #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
1160
+  + ENABLED(COREZY) \
1161
+  + ENABLED(MARKFORGED_XY)
1162
+  #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, COREZY, or MARKFORGED_XY."
1160 1163
 #endif
1161 1164
 
1162 1165
 /**
@@ -1576,8 +1579,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
1576 1579
 #if ENABLED(DUAL_X_CARRIAGE)
1577 1580
   #if EXTRUDERS < 2
1578 1581
     #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
1579
-  #elif CORE_IS_XY || CORE_IS_XZ
1580
-    #error "DUAL_X_CARRIAGE cannot be used with COREXY, COREYX, COREXZ, or COREZX."
1582
+  #elif ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
1583
+    #error "DUAL_X_CARRIAGE cannot be used with COREXY, COREYX, COREXZ, COREZX, or MARKFORGED_XY."
1581 1584
   #elif !GOOD_AXIS_PINS(X2)
1582 1585
     #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
1583 1586
   #elif !HAS_X_MAX
@@ -2533,6 +2536,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2533 2536
   #error "CoreXZ requires both X and Z to use sensorless homing if either one does."
2534 2537
 #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS && !HOMING_Z_WITH_PROBE
2535 2538
   #error "CoreYZ requires both Y and Z to use sensorless homing if either one does."
2539
+#elif ENABLED(MARKFORGED_XY) && X_SENSORLESS != Y_SENSORLESS
2540
+  #error "MARKFORGED_XY requires both X and Y to use sensorless homing if either one does."
2536 2541
 #endif
2537 2542
 
2538 2543
 // Other TMC feature requirements
@@ -2848,6 +2853,10 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2848 2853
     #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM."
2849 2854
   #elif !defined(BACKLASH_CORRECTION)
2850 2855
     #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION."
2856
+  #elif ENABLED(MARKFORGED_XY)
2857
+    constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM;
2858
+    static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2],
2859
+                  "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " on a MarkForged system.");
2851 2860
   #elif IS_CORE
2852 2861
     constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM;
2853 2862
     static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2],

+ 6
- 6
Marlin/src/module/endstops.cpp Datei anzeigen

@@ -498,7 +498,7 @@ void Endstops::update() {
498 498
   #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
499 499
   #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT))
500 500
 
501
-  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
501
+  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
502 502
     // If G38 command is active check Z_MIN_PROBE for ALL movement
503 503
     if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
504 504
   #endif
@@ -514,12 +514,12 @@ void Endstops::update() {
514 514
   #endif
515 515
 
516 516
   // Use HEAD for core axes, AXIS for others
517
-  #if CORE_IS_XY || CORE_IS_XZ
517
+  #if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
518 518
     #define X_AXIS_HEAD X_HEAD
519 519
   #else
520 520
     #define X_AXIS_HEAD X_AXIS
521 521
   #endif
522
-  #if CORE_IS_XY || CORE_IS_YZ
522
+  #if ANY(CORE_IS_XY, CORE_IS_YZ, MARKFORGED_XY)
523 523
     #define Y_AXIS_HEAD Y_HEAD
524 524
   #else
525 525
     #define Y_AXIS_HEAD Y_AXIS
@@ -736,7 +736,7 @@ void Endstops::update() {
736 736
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
737 737
   #endif
738 738
 
739
-  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
739
+  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
740 740
     #if ENABLED(G38_PROBE_AWAY)
741 741
       #define _G38_OPEN_STATE (G38_move >= 4)
742 742
     #else
@@ -865,7 +865,7 @@ void Endstops::update() {
865 865
     bool hit = false;
866 866
     #if X_SPI_SENSORLESS
867 867
       if (tmc_spi_homing.x && (stepperX.test_stall_status()
868
-        #if CORE_IS_XY && Y_SPI_SENSORLESS
868
+        #if ANY(CORE_IS_XY, MARKFORGED_XY) && Y_SPI_SENSORLESS
869 869
           || stepperY.test_stall_status()
870 870
         #elif CORE_IS_XZ && Z_SPI_SENSORLESS
871 871
           || stepperZ.test_stall_status()
@@ -877,7 +877,7 @@ void Endstops::update() {
877 877
     #endif
878 878
     #if Y_SPI_SENSORLESS
879 879
       if (tmc_spi_homing.y && (stepperY.test_stall_status()
880
-        #if CORE_IS_XY && X_SPI_SENSORLESS
880
+        #if ANY(CORE_IS_XY, MARKFORGED_XY) && X_SPI_SENSORLESS
881 881
           || stepperX.test_stall_status()
882 882
         #elif CORE_IS_YZ && Z_SPI_SENSORLESS
883 883
           || stepperZ.test_stall_status()

+ 10
- 7
Marlin/src/module/motion.cpp Datei anzeigen

@@ -1152,7 +1152,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) {
1152 1152
           #if AXIS_HAS_STALLGUARD(X2)
1153 1153
             stealth_states.x2 = tmc_enable_stallguard(stepperX2);
1154 1154
           #endif
1155
-          #if CORE_IS_XY && Y_SENSORLESS
1155
+          #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS
1156 1156
             stealth_states.y = tmc_enable_stallguard(stepperY);
1157 1157
           #elif CORE_IS_XZ && Z_SENSORLESS
1158 1158
             stealth_states.z = tmc_enable_stallguard(stepperZ);
@@ -1165,7 +1165,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) {
1165 1165
           #if AXIS_HAS_STALLGUARD(Y2)
1166 1166
             stealth_states.y2 = tmc_enable_stallguard(stepperY2);
1167 1167
           #endif
1168
-          #if CORE_IS_XY && X_SENSORLESS
1168
+          #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS
1169 1169
             stealth_states.x = tmc_enable_stallguard(stepperX);
1170 1170
           #elif CORE_IS_YZ && Z_SENSORLESS
1171 1171
             stealth_states.z = tmc_enable_stallguard(stepperZ);
@@ -1216,7 +1216,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) {
1216 1216
           #if AXIS_HAS_STALLGUARD(X2)
1217 1217
             tmc_disable_stallguard(stepperX2, enable_stealth.x2);
1218 1218
           #endif
1219
-          #if CORE_IS_XY && Y_SENSORLESS
1219
+          #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS
1220 1220
             tmc_disable_stallguard(stepperY, enable_stealth.y);
1221 1221
           #elif CORE_IS_XZ && Z_SENSORLESS
1222 1222
             tmc_disable_stallguard(stepperZ, enable_stealth.z);
@@ -1229,7 +1229,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) {
1229 1229
           #if AXIS_HAS_STALLGUARD(Y2)
1230 1230
             tmc_disable_stallguard(stepperY2, enable_stealth.y2);
1231 1231
           #endif
1232
-          #if CORE_IS_XY && X_SENSORLESS
1232
+          #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS
1233 1233
             tmc_disable_stallguard(stepperX, enable_stealth.x);
1234 1234
           #elif CORE_IS_YZ && Z_SENSORLESS
1235 1235
             tmc_disable_stallguard(stepperZ, enable_stealth.z);
@@ -1789,7 +1789,7 @@ void homeaxis(const AxisEnum axis) {
1789 1789
       do_homing_move(axis, adjDistance, get_homing_bump_feedrate(axis));
1790 1790
     }
1791 1791
 
1792
-  #else // CARTESIAN / CORE
1792
+  #else // CARTESIAN / CORE / MARKFORGED_XY
1793 1793
 
1794 1794
     set_axis_is_at_home(axis);
1795 1795
     sync_plan_position();
@@ -1818,8 +1818,11 @@ void homeaxis(const AxisEnum axis) {
1818 1818
 
1819 1819
       #if ENABLED(SENSORLESS_HOMING)
1820 1820
         planner.synchronize();
1821
-        if (TERN0(IS_CORE, axis != NORMAL_AXIS))
1822
-          safe_delay(200);  // Short delay to allow belts to spring back
1821
+        if (false
1822
+          #if EITHER(IS_CORE, MARKFORGED_XY)
1823
+            || axis != NORMAL_AXIS
1824
+          #endif
1825
+        ) safe_delay(200);  // Short delay to allow belts to spring back
1823 1826
       #endif
1824 1827
     }
1825 1828
   #endif

+ 43
- 5
Marlin/src/module/planner.cpp Datei anzeigen

@@ -1614,6 +1614,7 @@ void Planner::finish_and_disable() {
1614 1614
 float Planner::get_axis_position_mm(const AxisEnum axis) {
1615 1615
   float axis_steps;
1616 1616
   #if IS_CORE
1617
+
1617 1618
     // Requesting one of the "core" axes?
1618 1619
     if (axis == CORE_AXIS_1 || axis == CORE_AXIS_2) {
1619 1620
 
@@ -1631,9 +1632,30 @@ float Planner::get_axis_position_mm(const AxisEnum axis) {
1631 1632
     }
1632 1633
     else
1633 1634
       axis_steps = stepper.position(axis);
1635
+
1636
+  #elif ENABLED(MARKFORGED_XY)
1637
+
1638
+    // Requesting one of the joined axes?
1639
+    if (axis == CORE_AXIS_1 || axis == CORE_AXIS_2) {
1640
+      // Protect the access to the position.
1641
+      const bool was_enabled = stepper.suspend();
1642
+
1643
+      const int32_t p1 = stepper.position(CORE_AXIS_1),
1644
+                    p2 = stepper.position(CORE_AXIS_2);
1645
+
1646
+      if (was_enabled) stepper.wake_up();
1647
+
1648
+      axis_steps = ((axis == CORE_AXIS_1) ? p1 - p2 : p2);
1649
+    }
1650
+    else
1651
+      axis_steps = stepper.position(axis);
1652
+
1634 1653
   #else
1654
+
1635 1655
     axis_steps = stepper.position(axis);
1656
+
1636 1657
   #endif
1658
+
1637 1659
   return axis_steps * steps_to_mm[axis];
1638 1660
 }
1639 1661
 
@@ -1808,6 +1830,12 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1808 1830
     if (dc < 0) SBI(dm, Z_HEAD);                // ...and Z
1809 1831
     if (db + dc < 0) SBI(dm, B_AXIS);           // Motor B direction
1810 1832
     if (CORESIGN(db - dc) < 0) SBI(dm, C_AXIS); // Motor C direction
1833
+  #elif ENABLED(MARKFORGED_XY)
1834
+    if (da < 0) SBI(dm, X_HEAD);                // Save the real Extruder (head) direction in X Axis
1835
+    if (db < 0) SBI(dm, Y_HEAD);                // ...and Y
1836
+    if (dc < 0) SBI(dm, Z_AXIS);
1837
+    if (da + db < 0) SBI(dm, A_AXIS);           // Motor A direction
1838
+    if (db < 0) SBI(dm, B_AXIS);                // Motor B direction
1811 1839
   #else
1812 1840
     if (da < 0) SBI(dm, X_AXIS);
1813 1841
     if (db < 0) SBI(dm, Y_AXIS);
@@ -1843,6 +1871,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1843 1871
     block->steps.set(ABS(da + dc), ABS(db), ABS(da - dc));
1844 1872
   #elif CORE_IS_YZ
1845 1873
     block->steps.set(ABS(da), ABS(db + dc), ABS(db - dc));
1874
+  #elif ENABLED(MARKFORGED_XY)
1875
+    block->steps.set(ABS(da + db), ABS(db), ABS(dc));
1846 1876
   #elif IS_SCARA
1847 1877
     block->steps.set(ABS(da), ABS(db), ABS(dc));
1848 1878
   #else
@@ -1859,7 +1889,9 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1859 1889
    * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
1860 1890
    */
1861 1891
   struct DistanceMM : abce_float_t {
1862
-    TERN_(IS_CORE, xyz_pos_t head);
1892
+    #if EITHER(IS_CORE, MARKFORGED_XY)
1893
+      xyz_pos_t head;
1894
+    #endif
1863 1895
   } steps_dist_mm;
1864 1896
   #if IS_CORE
1865 1897
     #if CORE_IS_XY
@@ -1881,6 +1913,12 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1881 1913
       steps_dist_mm.b      = (db + dc) * steps_to_mm[B_AXIS];
1882 1914
       steps_dist_mm.c      = CORESIGN(db - dc) * steps_to_mm[C_AXIS];
1883 1915
     #endif
1916
+  #elif ENABLED(MARKFORGED_XY)
1917
+    steps_dist_mm.head.x = da * steps_to_mm[A_AXIS];
1918
+    steps_dist_mm.head.y = db * steps_to_mm[B_AXIS];
1919
+    steps_dist_mm.z      = dc * steps_to_mm[Z_AXIS];
1920
+    steps_dist_mm.a      = (da - db) * steps_to_mm[A_AXIS];
1921
+    steps_dist_mm.b      = db * steps_to_mm[B_AXIS];
1884 1922
   #else
1885 1923
     steps_dist_mm.a = da * steps_to_mm[A_AXIS];
1886 1924
     steps_dist_mm.b = db * steps_to_mm[B_AXIS];
@@ -1907,7 +1945,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1907 1945
       block->millimeters = millimeters;
1908 1946
     else
1909 1947
       block->millimeters = SQRT(
1910
-        #if CORE_IS_XY
1948
+        #if EITHER(CORE_IS_XY, MARKFORGED_XY)
1911 1949
           sq(steps_dist_mm.head.x) + sq(steps_dist_mm.head.y) + sq(steps_dist_mm.z)
1912 1950
         #elif CORE_IS_XZ
1913 1951
           sq(steps_dist_mm.head.x) + sq(steps_dist_mm.y) + sq(steps_dist_mm.head.z)
@@ -1964,7 +2002,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1964 2002
   #endif
1965 2003
 
1966 2004
   // Enable active axes
1967
-  #if CORE_IS_XY
2005
+  #if EITHER(CORE_IS_XY, MARKFORGED_XY)
1968 2006
     if (block->steps.a || block->steps.b) {
1969 2007
       ENABLE_AXIS_X();
1970 2008
       ENABLE_AXIS_Y();
@@ -2325,9 +2363,9 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2325 2363
      * On CoreXY the length of the vector [A,B] is SQRT(2) times the length of the head movement vector [X,Y].
2326 2364
      * So taking Z and E into account, we cannot scale to a unit vector with "inverse_millimeters".
2327 2365
      * => normalize the complete junction vector.
2328
-     * Elsewise, when needed JD factors in the E component
2366
+     * Elsewise, when needed JD will factor-in the E component
2329 2367
      */
2330
-    if (ENABLED(IS_CORE) || esteps > 0)
2368
+    if (EITHER(IS_CORE, MARKFORGED_XY) || esteps > 0)
2331 2369
       normalize_junction_vector(unit_vec);  // Normalize with XYZE components
2332 2370
     else
2333 2371
       unit_vec *= inverse_millimeters;      // Use pre-calculated (1 / SQRT(x^2 + y^2 + z^2))

+ 10
- 2
Marlin/src/module/stepper.cpp Datei anzeigen

@@ -2041,6 +2041,8 @@ uint32_t Stepper::block_phase_isr() {
2041 2041
           #define X_CMP(A,B) ((A)!=(B))
2042 2042
         #endif
2043 2043
         #define X_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && X_CMP(D_(1),D_(2))) )
2044
+      #elif ENABLED(MARKFORGED_XY)
2045
+        #define X_MOVE_TEST (current_block->steps.a != current_block->steps.b)
2044 2046
       #else
2045 2047
         #define X_MOVE_TEST !!current_block->steps.a
2046 2048
       #endif
@@ -2614,6 +2616,8 @@ void Stepper::_set_position(const int32_t &a, const int32_t &b, const int32_t &c
2614 2616
   #elif CORE_IS_YZ
2615 2617
     // coreyz planning
2616 2618
     count_position.set(a, b + c, CORESIGN(b - c));
2619
+  #elif ENABLED(MARKFORGED_XY)
2620
+    count_position.set(a - b, b, c);
2617 2621
   #else
2618 2622
     // default non-h-bot planning
2619 2623
     count_position.set(a, b, c);
@@ -2680,6 +2684,10 @@ void Stepper::endstop_triggered(const AxisEnum axis) {
2680 2684
         ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
2681 2685
         : count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
2682 2686
       ) * double(0.5)
2687
+    #elif ENABLED(MARKFORGED_XY)
2688
+      axis == CORE_AXIS_1
2689
+        ? count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2]
2690
+        : count_position[CORE_AXIS_2]
2683 2691
     #else // !IS_CORE
2684 2692
       count_position[axis]
2685 2693
     #endif
@@ -2709,12 +2717,12 @@ int32_t Stepper::triggered_position(const AxisEnum axis) {
2709 2717
 }
2710 2718
 
2711 2719
 void Stepper::report_a_position(const xyz_long_t &pos) {
2712
-  #if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
2720
+  #if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, DELTA, IS_SCARA)
2713 2721
     SERIAL_ECHOPAIR(STR_COUNT_A, pos.x, " B:", pos.y);
2714 2722
   #else
2715 2723
     SERIAL_ECHOPAIR_P(PSTR(STR_COUNT_X), pos.x, SP_Y_LBL, pos.y);
2716 2724
   #endif
2717
-  #if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA)
2725
+  #if ANY(CORE_IS_XZ, CORE_IS_YZ, DELTA)
2718 2726
     SERIAL_ECHOLNPAIR(" C:", pos.z);
2719 2727
   #else
2720 2728
     SERIAL_ECHOLNPAIR_P(SP_Z_LBL, pos.z);

Laden…
Abbrechen
Speichern