|
@@ -280,7 +280,6 @@ bool Running = true;
|
280
|
280
|
|
281
|
281
|
uint8_t marlin_debug_flags = DEBUG_NONE;
|
282
|
282
|
|
283
|
|
-static float feedrate = 1500.0, saved_feedrate;
|
284
|
283
|
float current_position[NUM_AXIS] = { 0.0 };
|
285
|
284
|
static float destination[NUM_AXIS] = { 0.0 };
|
286
|
285
|
bool axis_known_position[3] = { false };
|
|
@@ -302,11 +301,15 @@ static uint8_t cmd_queue_index_r = 0,
|
302
|
301
|
TempUnit input_temp_units = TEMPUNIT_C;
|
303
|
302
|
#endif
|
304
|
303
|
|
305
|
|
-const float homing_feedrate[] = HOMING_FEEDRATE;
|
|
304
|
+/**
|
|
305
|
+ * Feed rates are often configured with mm/m
|
|
306
|
+ * but the planner and stepper like mm/s units.
|
|
307
|
+ */
|
|
308
|
+const float homing_feedrate_mm_m[] = HOMING_FEEDRATE;
|
|
309
|
+static float feedrate_mm_m = 1500.0, saved_feedrate_mm_m;
|
|
310
|
+int feedrate_percentage = 100, saved_feedrate_percentage;
|
306
|
311
|
|
307
|
312
|
bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
|
308
|
|
-int feedrate_multiplier = 100; //100->1 200->2
|
309
|
|
-int saved_feedrate_multiplier;
|
310
|
313
|
int extruder_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100);
|
311
|
314
|
bool volumetric_enabled = false;
|
312
|
315
|
float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA);
|
|
@@ -382,16 +385,16 @@ static uint8_t target_extruder;
|
382
|
385
|
float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
|
383
|
386
|
#endif
|
384
|
387
|
|
385
|
|
-#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]))
|
|
388
|
+#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]))
|
386
|
389
|
|
387
|
390
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
388
|
|
- int xy_probe_speed = XY_PROBE_SPEED;
|
|
391
|
+ int xy_probe_feedrate_mm_m = XY_PROBE_SPEED;
|
389
|
392
|
bool bed_leveling_in_progress = false;
|
390
|
|
- #define XY_PROBE_FEEDRATE xy_probe_speed
|
|
393
|
+ #define XY_PROBE_FEEDRATE_MM_M xy_probe_feedrate_mm_m
|
391
|
394
|
#elif defined(XY_PROBE_SPEED)
|
392
|
|
- #define XY_PROBE_FEEDRATE XY_PROBE_SPEED
|
|
395
|
+ #define XY_PROBE_FEEDRATE_MM_M XY_PROBE_SPEED
|
393
|
396
|
#else
|
394
|
|
- #define XY_PROBE_FEEDRATE (PLANNER_XY_FEEDRATE() * 60)
|
|
397
|
+ #define XY_PROBE_FEEDRATE_MM_M MMS_TO_MMM(PLANNER_XY_FEEDRATE())
|
395
|
398
|
#endif
|
396
|
399
|
|
397
|
400
|
#if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
|
|
@@ -430,7 +433,7 @@ static uint8_t target_extruder;
|
430
|
433
|
float retract_zlift = RETRACT_ZLIFT;
|
431
|
434
|
float retract_recover_length = RETRACT_RECOVER_LENGTH;
|
432
|
435
|
float retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP;
|
433
|
|
- float retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE;
|
|
436
|
+ float retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE;
|
434
|
437
|
|
435
|
438
|
#endif // FWRETRACT
|
436
|
439
|
|
|
@@ -1598,7 +1601,7 @@ inline void set_homing_bump_feedrate(AxisEnum axis) {
|
1598
|
1601
|
SERIAL_ECHO_START;
|
1599
|
1602
|
SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1");
|
1600
|
1603
|
}
|
1601
|
|
- feedrate = homing_feedrate[axis] / hbd;
|
|
1604
|
+ feedrate_mm_m = homing_feedrate_mm_m[axis] / hbd;
|
1602
|
1605
|
}
|
1603
|
1606
|
//
|
1604
|
1607
|
// line_to_current_position
|
|
@@ -1606,19 +1609,19 @@ inline void set_homing_bump_feedrate(AxisEnum axis) {
|
1606
|
1609
|
// (or from wherever it has been told it is located).
|
1607
|
1610
|
//
|
1608
|
1611
|
inline void line_to_current_position() {
|
1609
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate / 60, active_extruder);
|
|
1612
|
+ 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);
|
1610
|
1613
|
}
|
1611
|
1614
|
inline void line_to_z(float zPosition) {
|
1612
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate / 60, active_extruder);
|
|
1615
|
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder);
|
1613
|
1616
|
}
|
1614
|
1617
|
//
|
1615
|
1618
|
// line_to_destination
|
1616
|
1619
|
// Move the planner, not necessarily synced with current_position
|
1617
|
1620
|
//
|
1618
|
|
-inline void line_to_destination(float mm_m) {
|
1619
|
|
- planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m / 60, active_extruder);
|
|
1621
|
+inline void line_to_destination(float fr_mm_m) {
|
|
1622
|
+ planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], MMM_TO_MMS(fr_mm_m), active_extruder);
|
1620
|
1623
|
}
|
1621
|
|
-inline void line_to_destination() { line_to_destination(feedrate); }
|
|
1624
|
+inline void line_to_destination() { line_to_destination(feedrate_mm_m); }
|
1622
|
1625
|
|
1623
|
1626
|
/**
|
1624
|
1627
|
* sync_plan_position
|
|
@@ -1646,7 +1649,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1646
|
1649
|
#endif
|
1647
|
1650
|
refresh_cmd_timeout();
|
1648
|
1651
|
calculate_delta(destination);
|
1649
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], (feedrate / 60) * (feedrate_multiplier / 100.0), active_extruder);
|
|
1652
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder);
|
1650
|
1653
|
set_current_to_destination();
|
1651
|
1654
|
}
|
1652
|
1655
|
#endif
|
|
@@ -1655,8 +1658,8 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1655
|
1658
|
* Plan a move to (X, Y, Z) and set the current_position
|
1656
|
1659
|
* The final current_position may not be the one that was requested
|
1657
|
1660
|
*/
|
1658
|
|
-static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0) {
|
1659
|
|
- float old_feedrate = feedrate;
|
|
1661
|
+static void do_blocking_move_to(float x, float y, float z, float fr_mm_m = 0.0) {
|
|
1662
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
1660
|
1663
|
|
1661
|
1664
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1662
|
1665
|
if (DEBUGGING(LEVELING)) print_xyz(PSTR("do_blocking_move_to"), NULL, x, y, z);
|
|
@@ -1664,7 +1667,7 @@ static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0
|
1664
|
1667
|
|
1665
|
1668
|
#if ENABLED(DELTA)
|
1666
|
1669
|
|
1667
|
|
- feedrate = (feed_rate != 0.0) ? feed_rate : XY_PROBE_FEEDRATE;
|
|
1670
|
+ feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
|
1668
|
1671
|
|
1669
|
1672
|
destination[X_AXIS] = x;
|
1670
|
1673
|
destination[Y_AXIS] = y;
|
|
@@ -1679,19 +1682,19 @@ static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0
|
1679
|
1682
|
|
1680
|
1683
|
// If Z needs to raise, do it before moving XY
|
1681
|
1684
|
if (current_position[Z_AXIS] < z) {
|
1682
|
|
- feedrate = (feed_rate != 0.0) ? feed_rate : homing_feedrate[Z_AXIS];
|
|
1685
|
+ feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS];
|
1683
|
1686
|
current_position[Z_AXIS] = z;
|
1684
|
1687
|
line_to_current_position();
|
1685
|
1688
|
}
|
1686
|
1689
|
|
1687
|
|
- feedrate = (feed_rate != 0.0) ? feed_rate : XY_PROBE_FEEDRATE;
|
|
1690
|
+ feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
|
1688
|
1691
|
current_position[X_AXIS] = x;
|
1689
|
1692
|
current_position[Y_AXIS] = y;
|
1690
|
1693
|
line_to_current_position();
|
1691
|
1694
|
|
1692
|
1695
|
// If Z needs to lower, do it after moving XY
|
1693
|
1696
|
if (current_position[Z_AXIS] > z) {
|
1694
|
|
- feedrate = (feed_rate != 0.0) ? feed_rate : homing_feedrate[Z_AXIS];
|
|
1697
|
+ feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS];
|
1695
|
1698
|
current_position[Z_AXIS] = z;
|
1696
|
1699
|
line_to_current_position();
|
1697
|
1700
|
}
|
|
@@ -1700,23 +1703,23 @@ static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0
|
1700
|
1703
|
|
1701
|
1704
|
stepper.synchronize();
|
1702
|
1705
|
|
1703
|
|
- feedrate = old_feedrate;
|
|
1706
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
1704
|
1707
|
}
|
1705
|
1708
|
|
1706
|
|
-inline void do_blocking_move_to_x(float x, float feed_rate = 0.0) {
|
1707
|
|
- do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], feed_rate);
|
|
1709
|
+inline void do_blocking_move_to_x(float x, float fr_mm_m = 0.0) {
|
|
1710
|
+ do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
|
1708
|
1711
|
}
|
1709
|
1712
|
|
1710
|
1713
|
inline void do_blocking_move_to_y(float y) {
|
1711
|
1714
|
do_blocking_move_to(current_position[X_AXIS], y, current_position[Z_AXIS]);
|
1712
|
1715
|
}
|
1713
|
1716
|
|
1714
|
|
-inline void do_blocking_move_to_xy(float x, float y, float feed_rate = 0.0) {
|
1715
|
|
- do_blocking_move_to(x, y, current_position[Z_AXIS], feed_rate);
|
|
1717
|
+inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m = 0.0) {
|
|
1718
|
+ do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m);
|
1716
|
1719
|
}
|
1717
|
1720
|
|
1718
|
|
-inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) {
|
1719
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, feed_rate);
|
|
1721
|
+inline void do_blocking_move_to_z(float z, float fr_mm_m = 0.0) {
|
|
1722
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_m);
|
1720
|
1723
|
}
|
1721
|
1724
|
|
1722
|
1725
|
//
|
|
@@ -1732,9 +1735,9 @@ static void setup_for_endstop_or_probe_move() {
|
1732
|
1735
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1733
|
1736
|
if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position);
|
1734
|
1737
|
#endif
|
1735
|
|
- saved_feedrate = feedrate;
|
1736
|
|
- saved_feedrate_multiplier = feedrate_multiplier;
|
1737
|
|
- feedrate_multiplier = 100;
|
|
1738
|
+ saved_feedrate_mm_m = feedrate_mm_m;
|
|
1739
|
+ saved_feedrate_percentage = feedrate_percentage;
|
|
1740
|
+ feedrate_percentage = 100;
|
1738
|
1741
|
refresh_cmd_timeout();
|
1739
|
1742
|
}
|
1740
|
1743
|
|
|
@@ -1742,8 +1745,8 @@ static void clean_up_after_endstop_or_probe_move() {
|
1742
|
1745
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1743
|
1746
|
if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position);
|
1744
|
1747
|
#endif
|
1745
|
|
- feedrate = saved_feedrate;
|
1746
|
|
- feedrate_multiplier = saved_feedrate_multiplier;
|
|
1748
|
+ feedrate_mm_m = saved_feedrate_mm_m;
|
|
1749
|
+ feedrate_percentage = saved_feedrate_percentage;
|
1747
|
1750
|
refresh_cmd_timeout();
|
1748
|
1751
|
}
|
1749
|
1752
|
|
|
@@ -2061,7 +2064,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2061
|
2064
|
// at the height where the probe triggered.
|
2062
|
2065
|
static float run_z_probe() {
|
2063
|
2066
|
|
2064
|
|
- float old_feedrate = feedrate;
|
|
2067
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
2065
|
2068
|
|
2066
|
2069
|
// Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding
|
2067
|
2070
|
refresh_cmd_timeout();
|
|
@@ -2076,7 +2079,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2076
|
2079
|
#endif
|
2077
|
2080
|
|
2078
|
2081
|
// move down slowly until you find the bed
|
2079
|
|
- feedrate = homing_feedrate[Z_AXIS] / 4;
|
|
2082
|
+ feedrate_mm_m = homing_feedrate_mm_m[Z_AXIS] / 4;
|
2080
|
2083
|
destination[Z_AXIS] = -10;
|
2081
|
2084
|
prepare_move_to_destination_raw(); // this will also set_current_to_destination
|
2082
|
2085
|
stepper.synchronize();
|
|
@@ -2100,7 +2103,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2100
|
2103
|
planner.bed_level_matrix.set_to_identity();
|
2101
|
2104
|
#endif
|
2102
|
2105
|
|
2103
|
|
- feedrate = homing_feedrate[Z_AXIS];
|
|
2106
|
+ feedrate_mm_m = homing_feedrate_mm_m[Z_AXIS];
|
2104
|
2107
|
|
2105
|
2108
|
// Move down until the Z probe (or endstop?) is triggered
|
2106
|
2109
|
float zPosition = -(Z_MAX_LENGTH + 10);
|
|
@@ -2139,7 +2142,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2139
|
2142
|
|
2140
|
2143
|
SYNC_PLAN_POSITION_KINEMATIC();
|
2141
|
2144
|
|
2142
|
|
- feedrate = old_feedrate;
|
|
2145
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
2143
|
2146
|
|
2144
|
2147
|
return current_position[Z_AXIS];
|
2145
|
2148
|
}
|
|
@@ -2164,7 +2167,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2164
|
2167
|
}
|
2165
|
2168
|
#endif
|
2166
|
2169
|
|
2167
|
|
- float old_feedrate = feedrate;
|
|
2170
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
2168
|
2171
|
|
2169
|
2172
|
// Ensure a minimum height before moving the probe
|
2170
|
2173
|
do_probe_raise(Z_RAISE_BETWEEN_PROBINGS);
|
|
@@ -2177,7 +2180,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2177
|
2180
|
SERIAL_ECHOLNPGM(")");
|
2178
|
2181
|
}
|
2179
|
2182
|
#endif
|
2180
|
|
- feedrate = XY_PROBE_FEEDRATE;
|
|
2183
|
+ feedrate_mm_m = XY_PROBE_FEEDRATE_MM_M;
|
2181
|
2184
|
do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
|
2182
|
2185
|
|
2183
|
2186
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -2214,7 +2217,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
2214
|
2217
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< probe_pt");
|
2215
|
2218
|
#endif
|
2216
|
2219
|
|
2217
|
|
- feedrate = old_feedrate;
|
|
2220
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
2218
|
2221
|
|
2219
|
2222
|
return measured_z;
|
2220
|
2223
|
}
|
|
@@ -2415,7 +2418,7 @@ static void homeaxis(AxisEnum axis) {
|
2415
|
2418
|
|
2416
|
2419
|
// Move towards the endstop until an endstop is triggered
|
2417
|
2420
|
destination[axis] = 1.5 * max_length(axis) * axis_home_dir;
|
2418
|
|
- feedrate = homing_feedrate[axis];
|
|
2421
|
+ feedrate_mm_m = homing_feedrate_mm_m[axis];
|
2419
|
2422
|
line_to_destination();
|
2420
|
2423
|
stepper.synchronize();
|
2421
|
2424
|
|
|
@@ -2455,7 +2458,7 @@ static void homeaxis(AxisEnum axis) {
|
2455
|
2458
|
sync_plan_position();
|
2456
|
2459
|
|
2457
|
2460
|
// Move to the adjusted endstop height
|
2458
|
|
- feedrate = homing_feedrate[axis];
|
|
2461
|
+ feedrate_mm_m = homing_feedrate_mm_m[axis];
|
2459
|
2462
|
destination[Z_AXIS] = adj;
|
2460
|
2463
|
line_to_destination();
|
2461
|
2464
|
stepper.synchronize();
|
|
@@ -2519,13 +2522,13 @@ static void homeaxis(AxisEnum axis) {
|
2519
|
2522
|
|
2520
|
2523
|
if (retracting == retracted[active_extruder]) return;
|
2521
|
2524
|
|
2522
|
|
- float old_feedrate = feedrate;
|
|
2525
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
2523
|
2526
|
|
2524
|
2527
|
set_destination_to_current();
|
2525
|
2528
|
|
2526
|
2529
|
if (retracting) {
|
2527
|
2530
|
|
2528
|
|
- feedrate = retract_feedrate_mm_s * 60;
|
|
2531
|
+ feedrate_mm_m = MMS_TO_MMM(retract_feedrate_mm_s);
|
2529
|
2532
|
current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder];
|
2530
|
2533
|
sync_plan_position_e();
|
2531
|
2534
|
prepare_move_to_destination();
|
|
@@ -2543,14 +2546,14 @@ static void homeaxis(AxisEnum axis) {
|
2543
|
2546
|
SYNC_PLAN_POSITION_KINEMATIC();
|
2544
|
2547
|
}
|
2545
|
2548
|
|
2546
|
|
- feedrate = retract_recover_feedrate * 60;
|
|
2549
|
+ feedrate_mm_m = MMM_TO_MMS(retract_recover_feedrate_mm_s);
|
2547
|
2550
|
float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length;
|
2548
|
2551
|
current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder];
|
2549
|
2552
|
sync_plan_position_e();
|
2550
|
2553
|
prepare_move_to_destination();
|
2551
|
2554
|
}
|
2552
|
2555
|
|
2553
|
|
- feedrate = old_feedrate;
|
|
2556
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
2554
|
2557
|
retracted[active_extruder] = retracting;
|
2555
|
2558
|
|
2556
|
2559
|
} // retract()
|
|
@@ -2612,10 +2615,10 @@ void gcode_get_destination() {
|
2612
|
2615
|
}
|
2613
|
2616
|
|
2614
|
2617
|
if (code_seen('F') && code_value_linear_units() > 0.0)
|
2615
|
|
- feedrate = code_value_linear_units();
|
|
2618
|
+ feedrate_mm_m = code_value_linear_units();
|
2616
|
2619
|
|
2617
|
2620
|
#if ENABLED(PRINTCOUNTER)
|
2618
|
|
- if(!DEBUGGING(DRYRUN))
|
|
2621
|
+ if (!DEBUGGING(DRYRUN))
|
2619
|
2622
|
print_job_timer.incFilamentUsed(destination[E_AXIS] - current_position[E_AXIS]);
|
2620
|
2623
|
#endif
|
2621
|
2624
|
|
|
@@ -2845,7 +2848,7 @@ inline void gcode_G4() {
|
2845
|
2848
|
|
2846
|
2849
|
destination[X_AXIS] = 1.5 * mlx * x_axis_home_dir;
|
2847
|
2850
|
destination[Y_AXIS] = 1.5 * mly * home_dir(Y_AXIS);
|
2848
|
|
- feedrate = min(homing_feedrate[X_AXIS], homing_feedrate[Y_AXIS]) * sqrt(mlratio * mlratio + 1);
|
|
2851
|
+ feedrate_mm_m = min(homing_feedrate_mm_m[X_AXIS], homing_feedrate_mm_m[Y_AXIS]) * sqrt(sq(mlratio) + 1);
|
2849
|
2852
|
line_to_destination();
|
2850
|
2853
|
stepper.synchronize();
|
2851
|
2854
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
|
@@ -2942,7 +2945,7 @@ inline void gcode_G28() {
|
2942
|
2945
|
|
2943
|
2946
|
// Move all carriages up together until the first endstop is hit.
|
2944
|
2947
|
for (int i = X_AXIS; i <= Z_AXIS; i++) destination[i] = 3 * (Z_MAX_LENGTH);
|
2945
|
|
- feedrate = 1.732 * homing_feedrate[X_AXIS];
|
|
2948
|
+ feedrate_mm_m = 1.732 * homing_feedrate_mm_m[X_AXIS];
|
2946
|
2949
|
line_to_destination();
|
2947
|
2950
|
stepper.synchronize();
|
2948
|
2951
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
|
@@ -3163,7 +3166,7 @@ inline void gcode_G28() {
|
3163
|
3166
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
3164
|
3167
|
current_position[Z_AXIS] = 0.0;
|
3165
|
3168
|
set_destination_to_current();
|
3166
|
|
- feedrate = homing_feedrate[Z_AXIS];
|
|
3169
|
+ feedrate_mm_m = homing_feedrate_mm_m[Z_AXIS];
|
3167
|
3170
|
line_to_destination();
|
3168
|
3171
|
stepper.synchronize();
|
3169
|
3172
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -3223,8 +3226,8 @@ inline void gcode_G28() {
|
3223
|
3226
|
enum MeshLevelingState { MeshReport, MeshStart, MeshNext, MeshSet, MeshSetZOffset, MeshReset };
|
3224
|
3227
|
|
3225
|
3228
|
inline void _mbl_goto_xy(float x, float y) {
|
3226
|
|
- float old_feedrate = feedrate;
|
3227
|
|
- feedrate = homing_feedrate[X_AXIS];
|
|
3229
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
|
3230
|
+ feedrate_mm_m = homing_feedrate_mm_m[X_AXIS];
|
3228
|
3231
|
|
3229
|
3232
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
|
3230
|
3233
|
#if Z_RAISE_BETWEEN_PROBINGS > MIN_Z_HEIGHT_FOR_HOMING
|
|
@@ -3244,7 +3247,7 @@ inline void gcode_G28() {
|
3244
|
3247
|
line_to_current_position();
|
3245
|
3248
|
#endif
|
3246
|
3249
|
|
3247
|
|
- feedrate = old_feedrate;
|
|
3250
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
3248
|
3251
|
stepper.synchronize();
|
3249
|
3252
|
}
|
3250
|
3253
|
|
|
@@ -3491,7 +3494,7 @@ inline void gcode_G28() {
|
3491
|
3494
|
}
|
3492
|
3495
|
#endif
|
3493
|
3496
|
|
3494
|
|
- xy_probe_speed = code_seen('S') ? (int)code_value_linear_units() : XY_PROBE_SPEED;
|
|
3497
|
+ xy_probe_feedrate_mm_m = code_seen('S') ? (int)code_value_linear_units() : XY_PROBE_SPEED;
|
3495
|
3498
|
|
3496
|
3499
|
int left_probe_bed_position = code_seen('L') ? (int)code_value_axis_units(X_AXIS) : LEFT_PROBE_BED_POSITION,
|
3497
|
3500
|
right_probe_bed_position = code_seen('R') ? (int)code_value_axis_units(X_AXIS) : RIGHT_PROBE_BED_POSITION,
|
|
@@ -5162,7 +5165,7 @@ inline void gcode_M92() {
|
5162
|
5165
|
if (value < 20.0) {
|
5163
|
5166
|
float factor = planner.axis_steps_per_mm[i] / value; // increase e constants if M92 E14 is given for netfab.
|
5164
|
5167
|
planner.max_e_jerk *= factor;
|
5165
|
|
- planner.max_feedrate[i] *= factor;
|
|
5168
|
+ planner.max_feedrate_mm_s[i] *= factor;
|
5166
|
5169
|
planner.max_acceleration_steps_per_s2[i] *= factor;
|
5167
|
5170
|
}
|
5168
|
5171
|
planner.axis_steps_per_mm[i] = value;
|
|
@@ -5371,7 +5374,7 @@ inline void gcode_M201() {
|
5371
|
5374
|
inline void gcode_M203() {
|
5372
|
5375
|
for (int8_t i = 0; i < NUM_AXIS; i++)
|
5373
|
5376
|
if (code_seen(axis_codes[i]))
|
5374
|
|
- planner.max_feedrate[i] = code_value_axis_units(i);
|
|
5377
|
+ planner.max_feedrate_mm_s[i] = code_value_axis_units(i);
|
5375
|
5378
|
}
|
5376
|
5379
|
|
5377
|
5380
|
/**
|
|
@@ -5417,8 +5420,8 @@ inline void gcode_M204() {
|
5417
|
5420
|
* E = Max E Jerk (units/sec^2)
|
5418
|
5421
|
*/
|
5419
|
5422
|
inline void gcode_M205() {
|
5420
|
|
- if (code_seen('S')) planner.min_feedrate = code_value_linear_units();
|
5421
|
|
- if (code_seen('T')) planner.min_travel_feedrate = code_value_linear_units();
|
|
5423
|
+ if (code_seen('S')) planner.min_feedrate_mm_s = code_value_linear_units();
|
|
5424
|
+ if (code_seen('T')) planner.min_travel_feedrate_mm_s = code_value_linear_units();
|
5422
|
5425
|
if (code_seen('B')) planner.min_segment_time = code_value_millis();
|
5423
|
5426
|
if (code_seen('X')) planner.max_xy_jerk = code_value_linear_units();
|
5424
|
5427
|
if (code_seen('Z')) planner.max_z_jerk = code_value_axis_units(Z_AXIS);
|
|
@@ -5516,7 +5519,7 @@ inline void gcode_M206() {
|
5516
|
5519
|
*/
|
5517
|
5520
|
inline void gcode_M207() {
|
5518
|
5521
|
if (code_seen('S')) retract_length = code_value_axis_units(E_AXIS);
|
5519
|
|
- if (code_seen('F')) retract_feedrate_mm_s = code_value_axis_units(E_AXIS) / 60;
|
|
5522
|
+ if (code_seen('F')) retract_feedrate_mm_s = MMM_TO_MMS(code_value_axis_units(E_AXIS));
|
5520
|
5523
|
if (code_seen('Z')) retract_zlift = code_value_axis_units(Z_AXIS);
|
5521
|
5524
|
#if EXTRUDERS > 1
|
5522
|
5525
|
if (code_seen('W')) retract_length_swap = code_value_axis_units(E_AXIS);
|
|
@@ -5528,11 +5531,11 @@ inline void gcode_M206() {
|
5528
|
5531
|
*
|
5529
|
5532
|
* S[+units] retract_recover_length (in addition to M207 S*)
|
5530
|
5533
|
* W[+units] retract_recover_length_swap (multi-extruder)
|
5531
|
|
- * F[units/min] retract_recover_feedrate
|
|
5534
|
+ * F[units/min] retract_recover_feedrate_mm_s
|
5532
|
5535
|
*/
|
5533
|
5536
|
inline void gcode_M208() {
|
5534
|
5537
|
if (code_seen('S')) retract_recover_length = code_value_axis_units(E_AXIS);
|
5535
|
|
- if (code_seen('F')) retract_recover_feedrate = code_value_axis_units(E_AXIS) / 60;
|
|
5538
|
+ if (code_seen('F')) retract_recover_feedrate_mm_s = MMM_TO_MMS(code_value_axis_units(E_AXIS));
|
5536
|
5539
|
#if EXTRUDERS > 1
|
5537
|
5540
|
if (code_seen('W')) retract_recover_length_swap = code_value_axis_units(E_AXIS);
|
5538
|
5541
|
#endif
|
|
@@ -5603,7 +5606,7 @@ inline void gcode_M206() {
|
5603
|
5606
|
* M220: Set speed percentage factor, aka "Feed Rate" (M220 S95)
|
5604
|
5607
|
*/
|
5605
|
5608
|
inline void gcode_M220() {
|
5606
|
|
- if (code_seen('S')) feedrate_multiplier = code_value_int();
|
|
5609
|
+ if (code_seen('S')) feedrate_percentage = code_value_int();
|
5607
|
5610
|
}
|
5608
|
5611
|
|
5609
|
5612
|
/**
|
|
@@ -6307,10 +6310,10 @@ inline void gcode_M503() {
|
6307
|
6310
|
|
6308
|
6311
|
// Define runplan for move axes
|
6309
|
6312
|
#if ENABLED(DELTA)
|
6310
|
|
- #define RUNPLAN(RATE) calculate_delta(destination); \
|
6311
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], RATE, active_extruder);
|
|
6313
|
+ #define RUNPLAN(RATE_MM_S) calculate_delta(destination); \
|
|
6314
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], RATE_MM_S, active_extruder);
|
6312
|
6315
|
#else
|
6313
|
|
- #define RUNPLAN(RATE) line_to_destination(RATE * 60);
|
|
6316
|
+ #define RUNPLAN(RATE_MM_S) line_to_destination(MMS_TO_MMM(RATE_MM_S));
|
6314
|
6317
|
#endif
|
6315
|
6318
|
|
6316
|
6319
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
@@ -6725,14 +6728,14 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6725
|
6728
|
return;
|
6726
|
6729
|
}
|
6727
|
6730
|
|
6728
|
|
- float old_feedrate = feedrate;
|
|
6731
|
+ float old_feedrate_mm_m = feedrate_mm_m;
|
6729
|
6732
|
|
6730
|
6733
|
if (code_seen('F')) {
|
6731
|
|
- float next_feedrate = code_value_axis_units(X_AXIS);
|
6732
|
|
- if (next_feedrate > 0.0) old_feedrate = feedrate = next_feedrate;
|
|
6734
|
+ float next_feedrate_mm_m = code_value_axis_units(X_AXIS);
|
|
6735
|
+ if (next_feedrate_mm_m > 0.0) old_feedrate_mm_m = feedrate_mm_m = next_feedrate_mm_m;
|
6733
|
6736
|
}
|
6734
|
6737
|
else
|
6735
|
|
- feedrate = XY_PROBE_FEEDRATE;
|
|
6738
|
+ feedrate_mm_m = XY_PROBE_FEEDRATE_MM_M;
|
6736
|
6739
|
|
6737
|
6740
|
if (tmp_extruder != active_extruder) {
|
6738
|
6741
|
bool no_move = code_seen('S') && code_value_bool();
|
|
@@ -6775,7 +6778,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6775
|
6778
|
current_position[Y_AXIS],
|
6776
|
6779
|
current_position[Z_AXIS] + (i == 2 ? 0 : TOOLCHANGE_PARK_ZLIFT),
|
6777
|
6780
|
current_position[E_AXIS],
|
6778
|
|
- planner.max_feedrate[i == 1 ? X_AXIS : Z_AXIS],
|
|
6781
|
+ planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS],
|
6779
|
6782
|
active_extruder
|
6780
|
6783
|
);
|
6781
|
6784
|
stepper.synchronize();
|
|
@@ -6838,7 +6841,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6838
|
6841
|
current_position[Y_AXIS],
|
6839
|
6842
|
current_position[Z_AXIS] + z_raise,
|
6840
|
6843
|
current_position[E_AXIS],
|
6841
|
|
- planner.max_feedrate[Z_AXIS],
|
|
6844
|
+ planner.max_feedrate_mm_s[Z_AXIS],
|
6842
|
6845
|
active_extruder
|
6843
|
6846
|
);
|
6844
|
6847
|
stepper.synchronize();
|
|
@@ -6853,7 +6856,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6853
|
6856
|
current_position[Y_AXIS],
|
6854
|
6857
|
current_position[Z_AXIS] + z_diff,
|
6855
|
6858
|
current_position[E_AXIS],
|
6856
|
|
- planner.max_feedrate[Z_AXIS],
|
|
6859
|
+ planner.max_feedrate_mm_s[Z_AXIS],
|
6857
|
6860
|
active_extruder
|
6858
|
6861
|
);
|
6859
|
6862
|
stepper.synchronize();
|
|
@@ -6984,7 +6987,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
6984
|
6987
|
enable_solenoid_on_active_extruder();
|
6985
|
6988
|
#endif // EXT_SOLENOID
|
6986
|
6989
|
|
6987
|
|
- feedrate = old_feedrate;
|
|
6990
|
+ feedrate_mm_m = old_feedrate_mm_m;
|
6988
|
6991
|
|
6989
|
6992
|
#else // HOTENDS <= 1
|
6990
|
6993
|
|
|
@@ -7837,9 +7840,9 @@ void clamp_to_software_endstops(float target[3]) {
|
7837
|
7840
|
#if ENABLED(MESH_BED_LEVELING)
|
7838
|
7841
|
|
7839
|
7842
|
// This function is used to split lines on mesh borders so each segment is only part of one mesh area
|
7840
|
|
-void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate, const uint8_t& extruder, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
|
|
7843
|
+void mesh_buffer_line(float x, float y, float z, const float e, float fr_mm_s, const uint8_t& extruder, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
|
7841
|
7844
|
if (!mbl.active()) {
|
7842
|
|
- planner.buffer_line(x, y, z, e, feed_rate, extruder);
|
|
7845
|
+ planner.buffer_line(x, y, z, e, fr_mm_s, extruder);
|
7843
|
7846
|
set_current_to_destination();
|
7844
|
7847
|
return;
|
7845
|
7848
|
}
|
|
@@ -7853,7 +7856,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7853
|
7856
|
NOMORE(cy, MESH_NUM_Y_POINTS - 2);
|
7854
|
7857
|
if (pcx == cx && pcy == cy) {
|
7855
|
7858
|
// Start and end on same mesh square
|
7856
|
|
- planner.buffer_line(x, y, z, e, feed_rate, extruder);
|
|
7859
|
+ planner.buffer_line(x, y, z, e, fr_mm_s, extruder);
|
7857
|
7860
|
set_current_to_destination();
|
7858
|
7861
|
return;
|
7859
|
7862
|
}
|
|
@@ -7892,7 +7895,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7892
|
7895
|
}
|
7893
|
7896
|
else {
|
7894
|
7897
|
// Already split on a border
|
7895
|
|
- planner.buffer_line(x, y, z, e, feed_rate, extruder);
|
|
7898
|
+ planner.buffer_line(x, y, z, e, fr_mm_s, extruder);
|
7896
|
7899
|
set_current_to_destination();
|
7897
|
7900
|
return;
|
7898
|
7901
|
}
|
|
@@ -7901,12 +7904,12 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7901
|
7904
|
destination[Y_AXIS] = ny;
|
7902
|
7905
|
destination[Z_AXIS] = nz;
|
7903
|
7906
|
destination[E_AXIS] = ne;
|
7904
|
|
- mesh_buffer_line(nx, ny, nz, ne, feed_rate, extruder, x_splits, y_splits);
|
|
7907
|
+ mesh_buffer_line(nx, ny, nz, ne, fr_mm_s, extruder, x_splits, y_splits);
|
7905
|
7908
|
destination[X_AXIS] = x;
|
7906
|
7909
|
destination[Y_AXIS] = y;
|
7907
|
7910
|
destination[Z_AXIS] = z;
|
7908
|
7911
|
destination[E_AXIS] = e;
|
7909
|
|
- mesh_buffer_line(x, y, z, e, feed_rate, extruder, x_splits, y_splits);
|
|
7912
|
+ mesh_buffer_line(x, y, z, e, fr_mm_s, extruder, x_splits, y_splits);
|
7910
|
7913
|
}
|
7911
|
7914
|
#endif // MESH_BED_LEVELING
|
7912
|
7915
|
|
|
@@ -7919,8 +7922,8 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7919
|
7922
|
float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS]));
|
7920
|
7923
|
if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]);
|
7921
|
7924
|
if (cartesian_mm < 0.000001) return false;
|
7922
|
|
- float _feedrate = feedrate * feedrate_multiplier / 6000.0;
|
7923
|
|
- float seconds = cartesian_mm / _feedrate;
|
|
7925
|
+ float _feedrate_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m);
|
|
7926
|
+ float seconds = cartesian_mm / _feedrate_mm_s;
|
7924
|
7927
|
int steps = max(1, int(delta_segments_per_second * seconds));
|
7925
|
7928
|
float inv_steps = 1.0/steps;
|
7926
|
7929
|
|
|
@@ -7944,7 +7947,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7944
|
7947
|
//DEBUG_POS("prepare_delta_move_to", target);
|
7945
|
7948
|
//DEBUG_POS("prepare_delta_move_to", delta);
|
7946
|
7949
|
|
7947
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], _feedrate, active_extruder);
|
|
7950
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], _feedrate_mm_s, active_extruder);
|
7948
|
7951
|
}
|
7949
|
7952
|
return true;
|
7950
|
7953
|
}
|
|
@@ -7963,7 +7966,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7963
|
7966
|
// move duplicate extruder into correct duplication position.
|
7964
|
7967
|
planner.set_position_mm(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
7965
|
7968
|
planner.buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset,
|
7966
|
|
- current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate[X_AXIS], 1);
|
|
7969
|
+ current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[X_AXIS], 1);
|
7967
|
7970
|
SYNC_PLAN_POSITION_KINEMATIC();
|
7968
|
7971
|
stepper.synchronize();
|
7969
|
7972
|
extruder_duplication_enabled = true;
|
|
@@ -7983,9 +7986,9 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7983
|
7986
|
}
|
7984
|
7987
|
delayed_move_time = 0;
|
7985
|
7988
|
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
|
7986
|
|
- planner.buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate[Z_AXIS], active_extruder);
|
|
7989
|
+ planner.buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
7987
|
7990
|
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], PLANNER_XY_FEEDRATE(), active_extruder);
|
7988
|
|
- planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate[Z_AXIS], active_extruder);
|
|
7991
|
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
7989
|
7992
|
active_extruder_parked = false;
|
7990
|
7993
|
}
|
7991
|
7994
|
}
|
|
@@ -7997,16 +8000,16 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7997
|
8000
|
#if DISABLED(DELTA) && DISABLED(SCARA)
|
7998
|
8001
|
|
7999
|
8002
|
inline bool prepare_move_to_destination_cartesian() {
|
8000
|
|
- // Do not use feedrate_multiplier for E or Z only moves
|
|
8003
|
+ // Do not use feedrate_percentage for E or Z only moves
|
8001
|
8004
|
if (current_position[X_AXIS] == destination[X_AXIS] && current_position[Y_AXIS] == destination[Y_AXIS]) {
|
8002
|
8005
|
line_to_destination();
|
8003
|
8006
|
}
|
8004
|
8007
|
else {
|
8005
|
8008
|
#if ENABLED(MESH_BED_LEVELING)
|
8006
|
|
- mesh_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate / 60) * (feedrate_multiplier / 100.0), active_extruder);
|
|
8009
|
+ mesh_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder);
|
8007
|
8010
|
return false;
|
8008
|
8011
|
#else
|
8009
|
|
- line_to_destination(feedrate * feedrate_multiplier / 100.0);
|
|
8012
|
+ line_to_destination(MMM_SCALED(feedrate_mm_m));
|
8010
|
8013
|
#endif
|
8011
|
8014
|
}
|
8012
|
8015
|
return true;
|
|
@@ -8150,7 +8153,7 @@ void prepare_move_to_destination() {
|
8150
|
8153
|
// Initialize the extruder axis
|
8151
|
8154
|
arc_target[E_AXIS] = current_position[E_AXIS];
|
8152
|
8155
|
|
8153
|
|
- float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
|
|
8156
|
+ float fr_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m);
|
8154
|
8157
|
|
8155
|
8158
|
millis_t next_idle_ms = millis() + 200UL;
|
8156
|
8159
|
|
|
@@ -8194,9 +8197,9 @@ void prepare_move_to_destination() {
|
8194
|
8197
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
8195
|
8198
|
adjust_delta(arc_target);
|
8196
|
8199
|
#endif
|
8197
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder);
|
|
8200
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder);
|
8198
|
8201
|
#else
|
8199
|
|
- planner.buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder);
|
|
8202
|
+ planner.buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder);
|
8200
|
8203
|
#endif
|
8201
|
8204
|
}
|
8202
|
8205
|
|
|
@@ -8206,9 +8209,9 @@ void prepare_move_to_destination() {
|
8206
|
8209
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
8207
|
8210
|
adjust_delta(target);
|
8208
|
8211
|
#endif
|
8209
|
|
- planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feed_rate, active_extruder);
|
|
8212
|
+ planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], fr_mm_s, active_extruder);
|
8210
|
8213
|
#else
|
8211
|
|
- planner.buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], feed_rate, active_extruder);
|
|
8214
|
+ planner.buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], fr_mm_s, active_extruder);
|
8212
|
8215
|
#endif
|
8213
|
8216
|
|
8214
|
8217
|
// As far as the parser is concerned, the position is now == target. In reality the
|
|
@@ -8221,7 +8224,7 @@ void prepare_move_to_destination() {
|
8221
|
8224
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
8222
|
8225
|
|
8223
|
8226
|
void plan_cubic_move(const float offset[4]) {
|
8224
|
|
- cubic_b_spline(current_position, destination, offset, feedrate * feedrate_multiplier / 60 / 100.0, active_extruder);
|
|
8227
|
+ cubic_b_spline(current_position, destination, offset, MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder);
|
8225
|
8228
|
|
8226
|
8229
|
// As far as the parser is concerned, the position is now == target. In reality the
|
8227
|
8230
|
// motion control system might still be processing the action and the real tool position
|
|
@@ -8547,7 +8550,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
8547
|
8550
|
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
|
8548
|
8551
|
planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
|
8549
|
8552
|
destination[E_AXIS] + (EXTRUDER_RUNOUT_EXTRUDE) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS],
|
8550
|
|
- (EXTRUDER_RUNOUT_SPEED) / 60. * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS], active_extruder);
|
|
8553
|
+ MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS], active_extruder);
|
8551
|
8554
|
current_position[E_AXIS] = oldepos;
|
8552
|
8555
|
destination[E_AXIS] = oldedes;
|
8553
|
8556
|
planner.set_e_position_mm(oldepos);
|