|
@@ -308,15 +308,15 @@ static uint8_t cmd_queue_index_r = 0,
|
308
|
308
|
* Feed rates are often configured with mm/m
|
309
|
309
|
* but the planner and stepper like mm/s units.
|
310
|
310
|
*/
|
311
|
|
-const float homing_feedrate_mm_m[] = {
|
|
311
|
+const float homing_feedrate_mm_s[] = {
|
312
|
312
|
#if ENABLED(DELTA)
|
313
|
|
- HOMING_FEEDRATE_Z, HOMING_FEEDRATE_Z,
|
|
313
|
+ MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z),
|
314
|
314
|
#else
|
315
|
|
- HOMING_FEEDRATE_XY, HOMING_FEEDRATE_XY,
|
|
315
|
+ MMM_TO_MMS(HOMING_FEEDRATE_XY), MMM_TO_MMS(HOMING_FEEDRATE_XY),
|
316
|
316
|
#endif
|
317
|
|
- HOMING_FEEDRATE_Z, 0
|
|
317
|
+ MMM_TO_MMS(HOMING_FEEDRATE_Z), 0
|
318
|
318
|
};
|
319
|
|
-static float feedrate_mm_m = 1500.0, saved_feedrate_mm_m;
|
|
319
|
+static float feedrate_mm_s = MMM_TO_MMS(1500.0), saved_feedrate_mm_s;
|
320
|
320
|
int feedrate_percentage = 100, saved_feedrate_percentage;
|
321
|
321
|
|
322
|
322
|
bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
|
|
@@ -393,13 +393,13 @@ static uint8_t target_extruder;
|
393
|
393
|
#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]))
|
394
|
394
|
|
395
|
395
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
396
|
|
- int xy_probe_feedrate_mm_m = XY_PROBE_SPEED;
|
|
396
|
+ float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
|
397
|
397
|
bool bed_leveling_in_progress = false;
|
398
|
|
- #define XY_PROBE_FEEDRATE_MM_M xy_probe_feedrate_mm_m
|
|
398
|
+ #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s
|
399
|
399
|
#elif defined(XY_PROBE_SPEED)
|
400
|
|
- #define XY_PROBE_FEEDRATE_MM_M XY_PROBE_SPEED
|
|
400
|
+ #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_SPEED)
|
401
|
401
|
#else
|
402
|
|
- #define XY_PROBE_FEEDRATE_MM_M MMS_TO_MMM(PLANNER_XY_FEEDRATE())
|
|
402
|
+ #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE()
|
403
|
403
|
#endif
|
404
|
404
|
|
405
|
405
|
#if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
|
|
@@ -580,7 +580,7 @@ void serial_echopair_P(const char* s_P, float v) { serialprintPGM(s_P);
|
580
|
580
|
void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
581
|
581
|
void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
582
|
582
|
|
583
|
|
-void tool_change(const uint8_t tmp_extruder, const float fr_mm_m=0.0, bool no_move=false);
|
|
583
|
+void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false);
|
584
|
584
|
static void report_current_position();
|
585
|
585
|
|
586
|
586
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -1606,7 +1606,7 @@ inline float get_homing_bump_feedrate(AxisEnum axis) {
|
1606
|
1606
|
SERIAL_ECHO_START;
|
1607
|
1607
|
SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1");
|
1608
|
1608
|
}
|
1609
|
|
- return homing_feedrate_mm_m[axis] / hbd;
|
|
1609
|
+ return homing_feedrate_mm_s[axis] / hbd;
|
1610
|
1610
|
}
|
1611
|
1611
|
//
|
1612
|
1612
|
// line_to_current_position
|
|
@@ -1614,30 +1614,30 @@ inline float get_homing_bump_feedrate(AxisEnum axis) {
|
1614
|
1614
|
// (or from wherever it has been told it is located).
|
1615
|
1615
|
//
|
1616
|
1616
|
inline void line_to_current_position() {
|
1617
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder);
|
|
1617
|
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder);
|
1618
|
1618
|
}
|
1619
|
1619
|
|
1620
|
1620
|
inline void line_to_z(float zPosition) {
|
1621
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder);
|
|
1621
|
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate_mm_s, active_extruder);
|
1622
|
1622
|
}
|
1623
|
1623
|
|
1624
|
|
-inline void line_to_axis_pos(AxisEnum axis, float where, float fr_mm_m = 0.0) {
|
1625
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
|
1624
|
+inline void line_to_axis_pos(AxisEnum axis, float where, float fr_mm_s = 0.0) {
|
|
1625
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
1626
|
1626
|
current_position[axis] = where;
|
1627
|
|
- feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[axis];
|
1628
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder);
|
|
1627
|
+ feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : homing_feedrate_mm_s[axis];
|
|
1628
|
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder);
|
1629
|
1629
|
stepper.synchronize();
|
1630
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
1630
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
1631
|
1631
|
}
|
1632
|
1632
|
|
1633
|
1633
|
//
|
1634
|
1634
|
// line_to_destination
|
1635
|
1635
|
// Move the planner, not necessarily synced with current_position
|
1636
|
1636
|
//
|
1637
|
|
-inline void line_to_destination(float fr_mm_m) {
|
1638
|
|
- planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], MMM_TO_MMS(fr_mm_m), active_extruder);
|
|
1637
|
+inline void line_to_destination(float fr_mm_s) {
|
|
1638
|
+ planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], fr_mm_s, active_extruder);
|
1639
|
1639
|
}
|
1640
|
|
-inline void line_to_destination() { line_to_destination(feedrate_mm_m); }
|
|
1640
|
+inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
|
1641
|
1641
|
|
1642
|
1642
|
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
|
1643
|
1643
|
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
|
|
@@ -1652,7 +1652,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1652
|
1652
|
#endif
|
1653
|
1653
|
refresh_cmd_timeout();
|
1654
|
1654
|
inverse_kinematics(destination);
|
1655
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder);
|
|
1655
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], MMS_SCALED(feedrate_mm_s), active_extruder);
|
1656
|
1656
|
set_current_to_destination();
|
1657
|
1657
|
}
|
1658
|
1658
|
#endif
|
|
@@ -1661,8 +1661,8 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1661
|
1661
|
* Plan a move to (X, Y, Z) and set the current_position
|
1662
|
1662
|
* The final current_position may not be the one that was requested
|
1663
|
1663
|
*/
|
1664
|
|
-void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
|
1665
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
|
1664
|
+void do_blocking_move_to(float x, float y, float z, float fr_mm_s /*=0.0*/) {
|
|
1665
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
1666
|
1666
|
|
1667
|
1667
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1668
|
1668
|
if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, x, y, z);
|
|
@@ -1670,7 +1670,7 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
|
1670
|
1670
|
|
1671
|
1671
|
#if ENABLED(DELTA)
|
1672
|
1672
|
|
1673
|
|
- feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
|
|
1673
|
+ feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
|
1674
|
1674
|
|
1675
|
1675
|
set_destination_to_current(); // sync destination at the start
|
1676
|
1676
|
|
|
@@ -1730,19 +1730,19 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
|
1730
|
1730
|
|
1731
|
1731
|
// If Z needs to raise, do it before moving XY
|
1732
|
1732
|
if (current_position[Z_AXIS] < z) {
|
1733
|
|
- feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS];
|
|
1733
|
+ feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS];
|
1734
|
1734
|
current_position[Z_AXIS] = z;
|
1735
|
1735
|
line_to_current_position();
|
1736
|
1736
|
}
|
1737
|
1737
|
|
1738
|
|
- feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
|
|
1738
|
+ feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
|
1739
|
1739
|
current_position[X_AXIS] = x;
|
1740
|
1740
|
current_position[Y_AXIS] = y;
|
1741
|
1741
|
line_to_current_position();
|
1742
|
1742
|
|
1743
|
1743
|
// If Z needs to lower, do it after moving XY
|
1744
|
1744
|
if (current_position[Z_AXIS] > z) {
|
1745
|
|
- feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS];
|
|
1745
|
+ feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS];
|
1746
|
1746
|
current_position[Z_AXIS] = z;
|
1747
|
1747
|
line_to_current_position();
|
1748
|
1748
|
}
|
|
@@ -1751,16 +1751,16 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
|
1751
|
1751
|
|
1752
|
1752
|
stepper.synchronize();
|
1753
|
1753
|
|
1754
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
1754
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
1755
|
1755
|
}
|
1756
|
|
-void do_blocking_move_to_x(float x, float fr_mm_m/*=0.0*/) {
|
1757
|
|
- do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
|
|
1756
|
+void do_blocking_move_to_x(float x, float fr_mm_s/*=0.0*/) {
|
|
1757
|
+ do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s);
|
1758
|
1758
|
}
|
1759
|
|
-void do_blocking_move_to_z(float z, float fr_mm_m/*=0.0*/) {
|
1760
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_m);
|
|
1759
|
+void do_blocking_move_to_z(float z, float fr_mm_s/*=0.0*/) {
|
|
1760
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_s);
|
1761
|
1761
|
}
|
1762
|
|
-void do_blocking_move_to_xy(float x, float y, float fr_mm_m/*=0.0*/) {
|
1763
|
|
- do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m);
|
|
1762
|
+void do_blocking_move_to_xy(float x, float y, float fr_mm_s/*=0.0*/) {
|
|
1763
|
+ do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_s);
|
1764
|
1764
|
}
|
1765
|
1765
|
|
1766
|
1766
|
//
|
|
@@ -1776,7 +1776,7 @@ static void setup_for_endstop_or_probe_move() {
|
1776
|
1776
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1777
|
1777
|
if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position);
|
1778
|
1778
|
#endif
|
1779
|
|
- saved_feedrate_mm_m = feedrate_mm_m;
|
|
1779
|
+ saved_feedrate_mm_s = feedrate_mm_s;
|
1780
|
1780
|
saved_feedrate_percentage = feedrate_percentage;
|
1781
|
1781
|
feedrate_percentage = 100;
|
1782
|
1782
|
refresh_cmd_timeout();
|
|
@@ -1786,7 +1786,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1786
|
1786
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1787
|
1787
|
if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position);
|
1788
|
1788
|
#endif
|
1789
|
|
- feedrate_mm_m = saved_feedrate_mm_m;
|
|
1789
|
+ feedrate_mm_s = saved_feedrate_mm_s;
|
1790
|
1790
|
feedrate_percentage = saved_feedrate_percentage;
|
1791
|
1791
|
refresh_cmd_timeout();
|
1792
|
1792
|
}
|
|
@@ -1881,7 +1881,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1881
|
1881
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
|
1882
|
1882
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
|
1883
|
1883
|
#endif
|
1884
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z, Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE);
|
|
1884
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
|
1885
|
1885
|
#endif
|
1886
|
1886
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z)
|
1887
|
1887
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X
|
|
@@ -1896,7 +1896,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1896
|
1896
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
|
1897
|
1897
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
|
1898
|
1898
|
#endif
|
1899
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z, Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE);
|
|
1899
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
|
1900
|
1900
|
#endif
|
1901
|
1901
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z)
|
1902
|
1902
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X
|
|
@@ -1911,7 +1911,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1911
|
1911
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
|
1912
|
1912
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
|
1913
|
1913
|
#endif
|
1914
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z, Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE);
|
|
1914
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
|
1915
|
1915
|
#endif
|
1916
|
1916
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z)
|
1917
|
1917
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X
|
|
@@ -1926,7 +1926,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1926
|
1926
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
|
1927
|
1927
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
|
1928
|
1928
|
#endif
|
1929
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z, Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE);
|
|
1929
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
|
1930
|
1930
|
#endif
|
1931
|
1931
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z)
|
1932
|
1932
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X
|
|
@@ -1941,7 +1941,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1941
|
1941
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
|
1942
|
1942
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
|
1943
|
1943
|
#endif
|
1944
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z, Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE);
|
|
1944
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
|
1945
|
1945
|
#endif
|
1946
|
1946
|
}
|
1947
|
1947
|
void run_stow_moves_script() {
|
|
@@ -1958,7 +1958,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1958
|
1958
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
|
1959
|
1959
|
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
|
1960
|
1960
|
#endif
|
1961
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z, Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE);
|
|
1961
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
|
1962
|
1962
|
#endif
|
1963
|
1963
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z)
|
1964
|
1964
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_X
|
|
@@ -1973,7 +1973,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1973
|
1973
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
|
1974
|
1974
|
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
|
1975
|
1975
|
#endif
|
1976
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z, Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE);
|
|
1976
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
|
1977
|
1977
|
#endif
|
1978
|
1978
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z)
|
1979
|
1979
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_X
|
|
@@ -1988,7 +1988,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1988
|
1988
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
|
1989
|
1989
|
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
|
1990
|
1990
|
#endif
|
1991
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z, Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE);
|
|
1991
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
|
1992
|
1992
|
#endif
|
1993
|
1993
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z)
|
1994
|
1994
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_X
|
|
@@ -2003,7 +2003,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2003
|
2003
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
|
2004
|
2004
|
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
|
2005
|
2005
|
#endif
|
2006
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z, Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE);
|
|
2006
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
|
2007
|
2007
|
#endif
|
2008
|
2008
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z)
|
2009
|
2009
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_X
|
|
@@ -2018,7 +2018,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2018
|
2018
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
|
2019
|
2019
|
#define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
|
2020
|
2020
|
#endif
|
2021
|
|
- do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z, Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE);
|
|
2021
|
+ do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
|
2022
|
2022
|
#endif
|
2023
|
2023
|
}
|
2024
|
2024
|
#endif
|
|
@@ -2122,20 +2122,20 @@ static void clean_up_after_endstop_or_probe_move() {
|
2122
|
2122
|
#endif
|
2123
|
2123
|
|
2124
|
2124
|
#if ENABLED(PROBE_DOUBLE_TOUCH)
|
2125
|
|
- do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), Z_PROBE_SPEED_FAST);
|
|
2125
|
+ do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
|
2126
|
2126
|
endstops.hit_on_purpose();
|
2127
|
2127
|
set_current_from_steppers_for_axis(Z_AXIS);
|
2128
|
2128
|
SYNC_PLAN_POSITION_KINEMATIC();
|
2129
|
2129
|
|
2130
|
2130
|
// move up the retract distance
|
2131
|
|
- do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST);
|
|
2131
|
+ do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
|
2132
|
2132
|
#else
|
2133
|
2133
|
// move fast, close to the bed
|
2134
|
|
- do_blocking_move_to_z(home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST);
|
|
2134
|
+ do_blocking_move_to_z(home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
|
2135
|
2135
|
#endif
|
2136
|
2136
|
|
2137
|
2137
|
// move down slowly to find bed
|
2138
|
|
- do_blocking_move_to_z(current_position[Z_AXIS] -2.0*home_bump_mm(Z_AXIS), Z_PROBE_SPEED_SLOW);
|
|
2138
|
+ do_blocking_move_to_z(current_position[Z_AXIS] -2.0*home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_SLOW));
|
2139
|
2139
|
endstops.hit_on_purpose();
|
2140
|
2140
|
set_current_from_steppers_for_axis(Z_AXIS);
|
2141
|
2141
|
SYNC_PLAN_POSITION_KINEMATIC();
|
|
@@ -2167,7 +2167,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2167
|
2167
|
}
|
2168
|
2168
|
#endif
|
2169
|
2169
|
|
2170
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
|
2170
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
2171
|
2171
|
|
2172
|
2172
|
// Ensure a minimum height before moving the probe
|
2173
|
2173
|
do_probe_raise(Z_PROBE_TRAVEL_HEIGHT);
|
|
@@ -2180,7 +2180,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2180
|
2180
|
SERIAL_ECHOLNPGM(")");
|
2181
|
2181
|
}
|
2182
|
2182
|
#endif
|
2183
|
|
- feedrate_mm_m = XY_PROBE_FEEDRATE_MM_M;
|
|
2183
|
+ feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
|
2184
|
2184
|
do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
|
2185
|
2185
|
|
2186
|
2186
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -2217,7 +2217,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2217
|
2217
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< probe_pt");
|
2218
|
2218
|
#endif
|
2219
|
2219
|
|
2220
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
2220
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
2221
|
2221
|
|
2222
|
2222
|
return measured_z;
|
2223
|
2223
|
}
|
|
@@ -2509,13 +2509,13 @@ static void homeaxis(AxisEnum axis) {
|
2509
|
2509
|
|
2510
|
2510
|
if (retracting == retracted[active_extruder]) return;
|
2511
|
2511
|
|
2512
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
|
2512
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
2513
|
2513
|
|
2514
|
2514
|
set_destination_to_current();
|
2515
|
2515
|
|
2516
|
2516
|
if (retracting) {
|
2517
|
2517
|
|
2518
|
|
- feedrate_mm_m = MMS_TO_MMM(retract_feedrate_mm_s);
|
|
2518
|
+ feedrate_mm_s = retract_feedrate_mm_s;
|
2519
|
2519
|
current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder];
|
2520
|
2520
|
sync_plan_position_e();
|
2521
|
2521
|
prepare_move_to_destination();
|
|
@@ -2533,14 +2533,14 @@ static void homeaxis(AxisEnum axis) {
|
2533
|
2533
|
SYNC_PLAN_POSITION_KINEMATIC();
|
2534
|
2534
|
}
|
2535
|
2535
|
|
2536
|
|
- feedrate_mm_m = MMS_TO_MMM(retract_recover_feedrate_mm_s);
|
|
2536
|
+ feedrate_mm_s = retract_recover_feedrate_mm_s;
|
2537
|
2537
|
float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length;
|
2538
|
2538
|
current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder];
|
2539
|
2539
|
sync_plan_position_e();
|
2540
|
2540
|
prepare_move_to_destination();
|
2541
|
2541
|
}
|
2542
|
2542
|
|
2543
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
2543
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
2544
|
2544
|
retracted[active_extruder] = retracting;
|
2545
|
2545
|
|
2546
|
2546
|
} // retract()
|
|
@@ -2602,7 +2602,7 @@ void gcode_get_destination() {
|
2602
|
2602
|
}
|
2603
|
2603
|
|
2604
|
2604
|
if (code_seen('F') && code_value_linear_units() > 0.0)
|
2605
|
|
- feedrate_mm_m = code_value_linear_units();
|
|
2605
|
+ feedrate_mm_s = MMM_TO_MMS(code_value_linear_units());
|
2606
|
2606
|
|
2607
|
2607
|
#if ENABLED(PRINTCOUNTER)
|
2608
|
2608
|
if (!DEBUGGING(DRYRUN))
|
|
@@ -2846,9 +2846,9 @@ inline void gcode_G4() {
|
2846
|
2846
|
float mlx = max_length(X_AXIS),
|
2847
|
2847
|
mly = max_length(Y_AXIS),
|
2848
|
2848
|
mlratio = mlx > mly ? mly / mlx : mlx / mly,
|
2849
|
|
- fr_mm_m = min(homing_feedrate_mm_m[X_AXIS], homing_feedrate_mm_m[Y_AXIS]) * sqrt(sq(mlratio) + 1.0);
|
|
2849
|
+ fr_mm_s = min(homing_feedrate_mm_s[X_AXIS], homing_feedrate_mm_s[Y_AXIS]) * sqrt(sq(mlratio) + 1.0);
|
2850
|
2850
|
|
2851
|
|
- do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_m);
|
|
2851
|
+ do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s);
|
2852
|
2852
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
2853
|
2853
|
current_position[X_AXIS] = current_position[Y_AXIS] = 0.0;
|
2854
|
2854
|
|
|
@@ -2940,7 +2940,7 @@ inline void gcode_G28() {
|
2940
|
2940
|
|
2941
|
2941
|
// Move all carriages up together until the first endstop is hit.
|
2942
|
2942
|
current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = 3.0 * (Z_MAX_LENGTH);
|
2943
|
|
- feedrate_mm_m = 1.732 * homing_feedrate_mm_m[X_AXIS];
|
|
2943
|
+ feedrate_mm_s = 1.732 * homing_feedrate_mm_s[X_AXIS];
|
2944
|
2944
|
line_to_current_position();
|
2945
|
2945
|
stepper.synchronize();
|
2946
|
2946
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
|
@@ -3157,7 +3157,7 @@ inline void gcode_G28() {
|
3157
|
3157
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
3158
|
3158
|
current_position[Z_AXIS] = 0.0;
|
3159
|
3159
|
set_destination_to_current();
|
3160
|
|
- feedrate_mm_m = homing_feedrate_mm_m[Z_AXIS];
|
|
3160
|
+ feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
|
3161
|
3161
|
line_to_destination();
|
3162
|
3162
|
stepper.synchronize();
|
3163
|
3163
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -3219,8 +3219,8 @@ inline void gcode_G28() {
|
3219
|
3219
|
|
3220
|
3220
|
#if ENABLED(MESH_BED_LEVELING)
|
3221
|
3221
|
inline void _mbl_goto_xy(float x, float y) {
|
3222
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
3223
|
|
- feedrate_mm_m = homing_feedrate_mm_m[X_AXIS];
|
|
3222
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
|
3223
|
+ feedrate_mm_s = homing_feedrate_mm_s[X_AXIS];
|
3224
|
3224
|
|
3225
|
3225
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
|
3226
|
3226
|
#if Z_PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT
|
|
@@ -3240,7 +3240,7 @@ inline void gcode_G28() {
|
3240
|
3240
|
line_to_current_position();
|
3241
|
3241
|
#endif
|
3242
|
3242
|
|
3243
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
3243
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
3244
|
3244
|
stepper.synchronize();
|
3245
|
3245
|
}
|
3246
|
3246
|
|
|
@@ -3487,7 +3487,7 @@ inline void gcode_G28() {
|
3487
|
3487
|
}
|
3488
|
3488
|
#endif
|
3489
|
3489
|
|
3490
|
|
- xy_probe_feedrate_mm_m = code_seen('S') ? (int)code_value_linear_units() : XY_PROBE_SPEED;
|
|
3490
|
+ xy_probe_feedrate_mm_s = MMM_TO_MMS(code_seen('S') ? code_value_linear_units() : XY_PROBE_SPEED);
|
3491
|
3491
|
|
3492
|
3492
|
int left_probe_bed_position = code_seen('L') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(LEFT_PROBE_BED_POSITION),
|
3493
|
3493
|
right_probe_bed_position = code_seen('R') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(RIGHT_PROBE_BED_POSITION),
|
|
@@ -6265,7 +6265,7 @@ inline void gcode_M503() {
|
6265
|
6265
|
#define RUNPLAN(RATE_MM_S) inverse_kinematics(destination); \
|
6266
|
6266
|
planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], RATE_MM_S, active_extruder);
|
6267
|
6267
|
#else
|
6268
|
|
- #define RUNPLAN(RATE_MM_S) line_to_destination(MMS_TO_MMM(RATE_MM_S));
|
|
6268
|
+ #define RUNPLAN(RATE_MM_S) line_to_destination(RATE_MM_S);
|
6269
|
6269
|
#endif
|
6270
|
6270
|
|
6271
|
6271
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
@@ -6655,7 +6655,7 @@ inline void invalid_extruder_error(const uint8_t &e) {
|
6655
|
6655
|
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
|
6656
|
6656
|
}
|
6657
|
6657
|
|
6658
|
|
-void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool no_move/*=false*/) {
|
|
6658
|
+void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) {
|
6659
|
6659
|
#if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
|
6660
|
6660
|
|
6661
|
6661
|
if (tmp_extruder >= MIXING_VIRTUAL_TOOLS) {
|
|
@@ -6676,9 +6676,9 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool n
|
6676
|
6676
|
return;
|
6677
|
6677
|
}
|
6678
|
6678
|
|
6679
|
|
- float old_feedrate_mm_m = feedrate_mm_m;
|
|
6679
|
+ float old_feedrate_mm_s = feedrate_mm_s;
|
6680
|
6680
|
|
6681
|
|
- feedrate_mm_m = fr_mm_m > 0.0 ? (old_feedrate_mm_m = fr_mm_m) : XY_PROBE_FEEDRATE_MM_M;
|
|
6681
|
+ feedrate_mm_s = fr_mm_s > 0.0 ? (old_feedrate_mm_s = fr_mm_s) : XY_PROBE_FEEDRATE_MM_S;
|
6682
|
6682
|
|
6683
|
6683
|
if (tmp_extruder != active_extruder) {
|
6684
|
6684
|
if (!no_move && axis_unhomed_error(true, true, true)) {
|
|
@@ -6928,14 +6928,14 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool n
|
6928
|
6928
|
enable_solenoid_on_active_extruder();
|
6929
|
6929
|
#endif // EXT_SOLENOID
|
6930
|
6930
|
|
6931
|
|
- feedrate_mm_m = old_feedrate_mm_m;
|
|
6931
|
+ feedrate_mm_s = old_feedrate_mm_s;
|
6932
|
6932
|
|
6933
|
6933
|
#else // HOTENDS <= 1
|
6934
|
6934
|
|
6935
|
6935
|
// Set the new active extruder
|
6936
|
6936
|
active_extruder = tmp_extruder;
|
6937
|
6937
|
|
6938
|
|
- UNUSED(fr_mm_m);
|
|
6938
|
+ UNUSED(fr_mm_s);
|
6939
|
6939
|
UNUSED(no_move);
|
6940
|
6940
|
|
6941
|
6941
|
#endif // HOTENDS <= 1
|
|
@@ -6971,7 +6971,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6971
|
6971
|
|
6972
|
6972
|
tool_change(
|
6973
|
6973
|
tmp_extruder,
|
6974
|
|
- code_seen('F') ? code_value_axis_units(X_AXIS) : 0.0,
|
|
6974
|
+ code_seen('F') ? MMM_TO_MMS(code_value_axis_units(X_AXIS)) : 0.0,
|
6975
|
6975
|
(tmp_extruder == active_extruder) || (code_seen('S') && code_value_bool())
|
6976
|
6976
|
);
|
6977
|
6977
|
|
|
@@ -7916,7 +7916,7 @@ void set_current_from_steppers_for_axis(AxisEnum axis) {
|
7916
|
7916
|
#if ENABLED(MESH_BED_LEVELING)
|
7917
|
7917
|
|
7918
|
7918
|
// This function is used to split lines on mesh borders so each segment is only part of one mesh area
|
7919
|
|
-void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
|
|
7919
|
+void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
|
7920
|
7920
|
int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X_AXIS)),
|
7921
|
7921
|
cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
|
7922
|
7922
|
cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
|
|
@@ -7928,7 +7928,7 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
7928
|
7928
|
|
7929
|
7929
|
if (cx1 == cx2 && cy1 == cy2) {
|
7930
|
7930
|
// Start and end on same mesh square
|
7931
|
|
- line_to_destination(fr_mm_m);
|
|
7931
|
+ line_to_destination(fr_mm_s);
|
7932
|
7932
|
set_current_to_destination();
|
7933
|
7933
|
return;
|
7934
|
7934
|
}
|
|
@@ -7955,7 +7955,7 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
7955
|
7955
|
}
|
7956
|
7956
|
else {
|
7957
|
7957
|
// Already split on a border
|
7958
|
|
- line_to_destination(fr_mm_m);
|
|
7958
|
+ line_to_destination(fr_mm_s);
|
7959
|
7959
|
set_current_to_destination();
|
7960
|
7960
|
return;
|
7961
|
7961
|
}
|
|
@@ -7964,11 +7964,11 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
7964
|
7964
|
destination[E_AXIS] = MBL_SEGMENT_END(E);
|
7965
|
7965
|
|
7966
|
7966
|
// Do the split and look for more borders
|
7967
|
|
- mesh_line_to_destination(fr_mm_m, x_splits, y_splits);
|
|
7967
|
+ mesh_line_to_destination(fr_mm_s, x_splits, y_splits);
|
7968
|
7968
|
|
7969
|
7969
|
// Restore destination from stack
|
7970
|
7970
|
memcpy(destination, end, sizeof(end));
|
7971
|
|
- mesh_line_to_destination(fr_mm_m, x_splits, y_splits);
|
|
7971
|
+ mesh_line_to_destination(fr_mm_s, x_splits, y_splits);
|
7972
|
7972
|
}
|
7973
|
7973
|
#endif // MESH_BED_LEVELING
|
7974
|
7974
|
|
|
@@ -7981,7 +7981,7 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
7981
|
7981
|
float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS]));
|
7982
|
7982
|
if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]);
|
7983
|
7983
|
if (cartesian_mm < 0.000001) return false;
|
7984
|
|
- float _feedrate_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m);
|
|
7984
|
+ float _feedrate_mm_s = MMS_SCALED(feedrate_mm_s);
|
7985
|
7985
|
float seconds = cartesian_mm / _feedrate_mm_s;
|
7986
|
7986
|
int steps = max(1, int(delta_segments_per_second * seconds));
|
7987
|
7987
|
float inv_steps = 1.0/steps;
|
|
@@ -8067,12 +8067,12 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
8067
|
8067
|
else {
|
8068
|
8068
|
#if ENABLED(MESH_BED_LEVELING)
|
8069
|
8069
|
if (mbl.active()) {
|
8070
|
|
- mesh_line_to_destination(MMM_SCALED(feedrate_mm_m));
|
|
8070
|
+ mesh_line_to_destination(MMS_SCALED(feedrate_mm_s));
|
8071
|
8071
|
return false;
|
8072
|
8072
|
}
|
8073
|
8073
|
else
|
8074
|
8074
|
#endif
|
8075
|
|
- line_to_destination(MMM_SCALED(feedrate_mm_m));
|
|
8075
|
+ line_to_destination(MMS_SCALED(feedrate_mm_s));
|
8076
|
8076
|
}
|
8077
|
8077
|
return true;
|
8078
|
8078
|
}
|
|
@@ -8213,7 +8213,7 @@ void prepare_move_to_destination() {
|
8213
|
8213
|
// Initialize the extruder axis
|
8214
|
8214
|
arc_target[E_AXIS] = current_position[E_AXIS];
|
8215
|
8215
|
|
8216
|
|
- float fr_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m);
|
|
8216
|
+ float fr_mm_s = MMS_SCALED(feedrate_mm_s);
|
8217
|
8217
|
|
8218
|
8218
|
millis_t next_idle_ms = millis() + 200UL;
|
8219
|
8219
|
|
|
@@ -8284,7 +8284,7 @@ void prepare_move_to_destination() {
|
8284
|
8284
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
8285
|
8285
|
|
8286
|
8286
|
void plan_cubic_move(const float offset[4]) {
|
8287
|
|
- cubic_b_spline(current_position, destination, offset, MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder);
|
|
8287
|
+ cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
|
8288
|
8288
|
|
8289
|
8289
|
// As far as the parser is concerned, the position is now == target. In reality the
|
8290
|
8290
|
// motion control system might still be processing the action and the real tool position
|
|
@@ -8610,8 +8610,8 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
8610
|
8610
|
|
8611
|
8611
|
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
|
8612
|
8612
|
planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
|
8613
|
|
- destination[E_AXIS] + (EXTRUDER_RUNOUT_EXTRUDE) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS],
|
8614
|
|
- MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS], active_extruder);
|
|
8613
|
+ destination[E_AXIS] + (EXTRUDER_RUNOUT_EXTRUDE) * (EXTRUDER_RUNOUT_ESTEPS) * planner.steps_to_mm[E_AXIS],
|
|
8614
|
+ MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED) * (EXTRUDER_RUNOUT_ESTEPS) * planner.steps_to_mm[E_AXIS], active_extruder);
|
8615
|
8615
|
current_position[E_AXIS] = oldepos;
|
8616
|
8616
|
destination[E_AXIS] = oldedes;
|
8617
|
8617
|
planner.set_e_position_mm(oldepos);
|