|
@@ -610,6 +610,20 @@ static void report_current_position();
|
610
|
610
|
print_xyz(PSTR(STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
|
611
|
611
|
#endif
|
612
|
612
|
|
|
613
|
+/**
|
|
614
|
+ * sync_plan_position
|
|
615
|
+ * Set planner / stepper positions to the cartesian current_position.
|
|
616
|
+ * The stepper code translates these coordinates into step units.
|
|
617
|
+ * Allows translation between steps and millimeters for cartesian & core robots
|
|
618
|
+ */
|
|
619
|
+inline void sync_plan_position() {
|
|
620
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
621
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);
|
|
622
|
+ #endif
|
|
623
|
+ planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
624
|
+}
|
|
625
|
+inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
|
|
626
|
+
|
613
|
627
|
#if ENABLED(DELTA) || ENABLED(SCARA)
|
614
|
628
|
inline void sync_plan_position_delta() {
|
615
|
629
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -1627,19 +1641,6 @@ inline void line_to_destination(float fr_mm_m) {
|
1627
|
1641
|
}
|
1628
|
1642
|
inline void line_to_destination() { line_to_destination(feedrate_mm_m); }
|
1629
|
1643
|
|
1630
|
|
-/**
|
1631
|
|
- * sync_plan_position
|
1632
|
|
- * Set planner / stepper positions to the cartesian current_position.
|
1633
|
|
- * The stepper code translates these coordinates into step units.
|
1634
|
|
- * Allows translation between steps and millimeters for cartesian & core robots
|
1635
|
|
- */
|
1636
|
|
-inline void sync_plan_position() {
|
1637
|
|
- #if ENABLED(DEBUG_LEVELING_FEATURE)
|
1638
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);
|
1639
|
|
- #endif
|
1640
|
|
- planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
1641
|
|
-}
|
1642
|
|
-inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
|
1643
|
1644
|
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
|
1644
|
1645
|
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
|
1645
|
1646
|
|